]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - STEER/AliDetectorTag.cxx
addapt array of histograms for different SM combinations to new EMCAL SM
[u/mrichter/AliRoot.git] / STEER / AliDetectorTag.cxx
... / ...
CommitLineData
1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/* $Id$ */
17
18//-----------------------------------------------------------------
19// Implementation of the DetectorTag class
20// This is the class to deal with the tags in the detector level
21// Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
22//-----------------------------------------------------------------
23
24#include "TMath.h"
25
26#include "AliDetectorTag.h"
27#include "AliLog.h"
28#include "TObjString.h"
29
30ClassImp(AliDetectorTag)
31
32//___________________________________________________________________________
33AliDetectorTag::AliDetectorTag() :
34 TObject(),
35 fMaskDAQ(0),
36 fMaskReco(0),
37 fDetectorValidityRange(),
38 fDetectorStatus()
39{
40 // Default constructor
41 for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
42 fDetectorValidityRange[iter] = 0;
43 fDetectorStatus[iter] = "";
44 }
45}
46
47//___________________________________________________________________________
48AliDetectorTag::AliDetectorTag(const AliDetectorTag & detTag) :
49 TObject(detTag),
50 fMaskDAQ(detTag.fMaskDAQ),
51 fMaskReco(detTag.fMaskReco),
52 fDetectorValidityRange(),
53 fDetectorStatus()
54{
55 // DetectorTag copy constructor
56
57 for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
58 fDetectorValidityRange[iter] = detTag.GetDetectorValidityRange(iter);
59 fDetectorStatus[iter] = detTag.GetDetectorStatus(iter);
60 }
61}
62
63//___________________________________________________________________________
64AliDetectorTag & AliDetectorTag::operator=(const AliDetectorTag &detTag) {
65 //DetectorTag assignment operator
66 if (this != &detTag) {
67 TObject::operator=(detTag);
68
69 fMaskDAQ = detTag.fMaskDAQ;
70 fMaskReco = detTag.fMaskReco;
71 for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
72 fDetectorValidityRange[iter] = detTag.GetDetectorValidityRange(iter);
73 fDetectorStatus[iter] = detTag.GetDetectorStatus(iter);
74 }
75 }
76 return *this;
77}
78
79//___________________________________________________________________________
80AliDetectorTag::~AliDetectorTag() {
81 // Destructor
82}
83
84void AliDetectorTag::UpdateFromRunTable(AliDetectorTag &detTag)
85{
86 for (int iter=0; iter<AliDAQ::kHLTId; iter++) {
87 fDetectorValidityRange[iter] = detTag.GetDetectorValidityRange(iter);
88 fDetectorStatus[iter] = detTag.GetDetectorStatus(iter);
89 }
90}
91
92
93//___________________________________________________________________________
94// void AliDetectorTag::SetDetectorConfiguration() {
95// //sets the detector configuration
96// if(fDetectors[0] == 1) {
97// SetITSSPD(); fDetectorArray->Add(new TObjString("SPD"));}
98// if(fDetectors[1] == 1) {
99// SetITSSDD(); fDetectorArray->Add(new TObjString("SDD"));}
100// if(fDetectors[2] == 1) {
101// SetITSSSD(); fDetectorArray->Add(new TObjString("SSD"));}
102// if(fDetectors[3] == 1) {
103// SetTPC(); fDetectorArray->Add(new TObjString("TPC"));}
104// if(fDetectors[4] == 1) {
105// SetTRD(); fDetectorArray->Add(new TObjString("TRD"));}
106// if(fDetectors[5] == 1) {
107// SetTOF(); fDetectorArray->Add(new TObjString("TOF"));}
108// if(fDetectors[6] == 1) {
109// SetHMPID();fDetectorArray->Add(new TObjString("HMPID"));}
110// if(fDetectors[7] == 1) {
111// SetPHOS(); fDetectorArray->Add(new TObjString("PHOS"));}
112// if(fDetectors[9] == 1) {
113// SetPMD(); fDetectorArray->Add(new TObjString("PMD"));}
114// if(fDetectors[10] == 1) {
115// SetMUON(); fDetectorArray->Add(new TObjString("MUON"));}
116// if(fDetectors[12] == 1) {
117// SetFMD(); fDetectorArray->Add(new TObjString("FMD"));}
118// if(fDetectors[13] == 1) {
119// SetTZERO(); fDetectorArray->Add(new TObjString("T0"));}
120// if(fDetectors[14] == 1) {
121// SetVZERO(); fDetectorArray->Add(new TObjString("VZERO"));}
122// if(fDetectors[15] == 1) {
123// SetZDC(); fDetectorArray->Add(new TObjString("ZDC"));}
124// if(fDetectors[18] == 1) {
125// SetEMCAL(); fDetectorArray->Add(new TObjString("EMCAL"));}
126// }
127
128//___________________________________________________________________________
129void AliDetectorTag::PrintDetectorMask() {
130 //prints the detector mask
131 AliInfo( Form( "ITS-SPD: %d", GetITSSPD()) );
132 AliInfo( Form( "ITS-SDD: %d", GetITSSDD()) );
133 AliInfo( Form( "ITS-SSD: %d", GetITSSSD()) );
134 AliInfo( Form( "TPC: %d", GetTPC()) );
135 AliInfo( Form( "TRD: %d", GetTRD()) );
136 AliInfo( Form( "TOF: %d", GetTOF()) );
137 AliInfo( Form( "HMPID: %d", GetHMPID()) );
138 AliInfo( Form( "PHOS: %d", GetPHOS()) );
139 AliInfo( Form( "PMD: %d", GetPMD()) );
140 AliInfo( Form( "MUON: %d", GetMUON()) );
141 AliInfo( Form( "FMD: %d", GetFMD()) );
142 AliInfo( Form( "TZERO: %d", GetTZERO()) );
143 AliInfo( Form( "VZERO: %d", GetVZERO()) );
144 AliInfo( Form( "ZDC: %d", GetZDC()) );
145 AliInfo( Form( "EMCAL: %d", GetEMCAL()) );
146}