File: UnplacedRootVolume.cpp

package info (click to toggle)
vecgeom 1.2.8%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 24,016 kB
  • sloc: cpp: 88,803; ansic: 6,888; python: 1,035; sh: 582; sql: 538; makefile: 23
file content (46 lines) | stat: -rw-r--r-- 1,442 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/// \file UnplacedRootVolume.cpp
/// \author Johannes de Fine Licht (johannes.definelicht@cern.ch)

#include "UnplacedRootVolume.h"

#include "PlacedRootVolume.h"

#include <stdio.h>

namespace vecgeom {

void UnplacedRootVolume::Print() const
{
  printf("UnplacedRootVolume");
}

void UnplacedRootVolume::Print(std::ostream &os) const
{
  os << "UnplacedRootVolume";
}

VPlacedVolume *UnplacedRootVolume::SpecializedVolume(LogicalVolume const *const volume,
                                                     Transformation3D const *const transformation,
                                                     const TranslationCode trans_code, const RotationCode rot_code,
                                                     VPlacedVolume *const placement) const
{
  if (placement) {
    return new (placement) PlacedRootVolume(fRootShape, volume, transformation);
  }
  return new PlacedRootVolume(fRootShape, volume, transformation);
}

#ifdef VECGEOM_CUDA_INTERFACE
DevicePtr<cuda::VUnplacedVolume> UnplacedRootVolume::CopyToGpu() const
{
  assert(0 && "Attempted to copy unsupported ROOT volume to GPU.");
  return DevicePtr<cuda::VUnplacedVolume>(nullptr);
}
DevicePtr<cuda::VUnplacedVolume> UnplacedRootVolume::CopyToGpu(DevicePtr<cuda::VUnplacedVolume> /* gpu_ptr */) const
{
  assert(0 && "Attempted to copy unsupported ROOT volume to GPU.");
  return DevicePtr<cuda::VUnplacedVolume>(nullptr);
}
#endif

} // End namespace vecgeom