GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TTdrDetectorInformation.cxx
Go to the documentation of this file.
2
3#include <iostream>
4
5#include "TROOT.h"
6
7#include "TGRSIOptions.h"
8#include "TTdrMnemonic.h"
9
10/// \cond CLASSIMP
12/// \endcond
13
15{
16 /// Default ctor for TTdrDetectorInformation.
17 Clear();
18 Set();
19}
20
22
27
28void TTdrDetectorInformation::Print(Option_t* opt) const
29{
30 // Prints the TTdrDetectorInformation. Options:
31 // a: Print out more details.
32 if(strchr(opt, 'a') != nullptr) {
33 printf("\t\tTDRCLOVER: %s\n", TdrClover() ? "true" : "false");
34 printf("\t\tTDRTIGRESS: %s\n", TdrTigress() ? "true" : "false");
35 printf("\t\tTDRSILI: %s\n", TdrSiLi() ? "true" : "false");
36 printf("\t\tTDRPLASTIC: %s\n", TdrPlastic() ? "true" : "false");
37 printf("\n");
38 }
39}
40
42{
43 // Clears the TTdrDetectorInformation. Currently, there are no available
44 // options.
45
47
48 fTdrClover = false;
49 fTdrTigress = false;
50 fTdrSiLi = false;
51 fTdrPlastic = false;
52}
53
55{
56 /// Sets the run info. This figures out what systems are available.
57 for(auto iter = TChannel::GetChannelMap()->begin(); iter != TChannel::GetChannelMap()->end(); iter++) {
58 std::string channelname = iter->second->GetName();
59
60 // detector system type.
61 // for more info, see: https://www.triumf.info/wiki/tigwiki/index.php/Detector_Nomenclature
62 switch(static_cast<const TTdrMnemonic*>(iter->second->GetMnemonic())->System()) {
65 break;
68 break;
70 SetTdrSiLi();
71 break;
74 break;
75 default:
76 break;
77 };
78 }
79}
80
ClassImp(THILMnemonic) void THILMnemonic
static std::unordered_map< unsigned int, TChannel * > * GetChannelMap()
Definition TChannel.h:72
void Clear(Option_t *="") override
void Clear(Option_t *="") override
void SetTdrSiLi(bool flag=true)
void SetTdrClover(bool flag=true)
void Print(Option_t *opt="") const override
TEventBuildingLoop::EBuildMode BuildMode() const override
Set the detector information based on the available TChannels.
void SetTdrTigress(bool flag=true)
void SetTdrPlastic(bool flag=true)
~TTdrDetectorInformation() override
ESystem System() const