Project
Loading...
Searching...
No Matches
ExternalModule.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#ifndef ALICEO2_PASSIVE_EXTERNALMODULE_H
13#define ALICEO2_PASSIVE_EXTERNALMODULE_H
14
15#include "DetectorsPassive/PassiveBase.h" // base class of passive modules
16#include "Rtypes.h" // for Pipe::Class, ClassDef, Pipe::Streamer
17#include <string>
18#include <vector>
19
20class TGeoVolume;
21class TGeoTransformation;
22
23namespace o2
24{
25namespace passive
26{
27
28// options used to configure a generic plug and play external module
30 std::string root_macro_file; // the file where to lookup the ROOT geometry building macro
31 std::string top_volume; // the volume to be added
32 std::string anchor_volume; // the volume into which the detector will be hooked
33 TGeoMatrix const* placement = nullptr; // how to place the module inside anchor_volume
34};
35
36// a module (passive material) defined externally (ROOT macro / GDML / TGeo geometry)
38{
39 public:
40 ExternalModule(const char* name, const char* long_title, ExternalModuleOptions options);
41 ExternalModule() = default; // default constructor
42
43 ~ExternalModule() override = default;
44 void ConstructGeometry() override;
45
51 static std::vector<ExternalModule*> createFromJSON(const std::string& jsonfile);
52
54 FairModule* CloneModule() const override { return nullptr; }
55
56 private:
57 // void createMaterials();
58 ExternalModule(const ExternalModule& orig);
59 ExternalModule& operator=(const ExternalModule&);
60
61 ExternalModuleOptions mOptions;
62
63 // ClassDefOverride(ExternalModule, 0);
64};
65} // namespace passive
66} // namespace o2
67#endif
~ExternalModule() override=default
static std::vector< ExternalModule * > createFromJSON(const std::string &jsonfile)
FairModule * CloneModule() const override
Clone this object (used in MT mode only)
a common base class for passive modules - implementing generic functions
Definition PassiveBase.h:24
GLuint const GLchar * name
Definition glcorearb.h:781
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...