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
11{
12 /// Default ctor for TTdrDetectorInformation.
13 Clear();
14 Set();
15}
16
18
23
24void TTdrDetectorInformation::Print(Option_t* opt) const
25{
26 // Prints the TTdrDetectorInformation. Options:
27 // a: Print out more details.
28 if(strchr(opt, 'a') != nullptr) {
29 printf("\t\tTDRCLOVER: %s\n", TdrClover() ? "true" : "false");
30 printf("\t\tTDRTIGRESS: %s\n", TdrTigress() ? "true" : "false");
31 printf("\t\tTDRSILI: %s\n", TdrSiLi() ? "true" : "false");
32 printf("\t\tTDRPLASTIC: %s\n", TdrPlastic() ? "true" : "false");
33 printf("\n");
34 }
35}
36
38{
39 // Clears the TTdrDetectorInformation. Currently, there are no available
40 // options.
41
43
44 fTdrClover = false;
45 fTdrTigress = false;
46 fTdrSiLi = false;
47 fTdrPlastic = false;
48}
49
51{
52 /// Sets the run info. This figures out what systems are available.
53 for(auto iter = TChannel::GetChannelMap()->begin(); iter != TChannel::GetChannelMap()->end(); iter++) {
54 std::string channelname = iter->second->GetName();
55
56 // detector system type.
57 // for more info, see: https://www.triumf.info/wiki/tigwiki/index.php/Detector_Nomenclature
58 switch(static_cast<const TTdrMnemonic*>(iter->second->GetMnemonic())->System()) {
61 break;
64 break;
66 SetTdrSiLi();
67 break;
70 break;
71 default:
72 break;
73 };
74 }
75}
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