2 #ifndef __LASGLOBALDATA_H
3 #define __LASGLOBALDATA_H
94 if( !( ( theDetector == 0 || theDetector == 1 ) &&
95 ( theRing == 0 || theRing == 1 ) &&
96 ( theBeam >= 0 && theBeam < 8 ) &&
97 ( theDisk >= 0 && theDisk < 9 ) ) ) {
98 std::cerr <<
" [LASGlobalData::GetTECEntry] ** ERROR: illegal input coordinates:" << std::endl;
99 std::cerr <<
" detector " << theDetector <<
", ring " << theRing <<
", beam " << theBeam <<
", disk " << theDisk <<
"." << std::endl;
100 throw " Bailing out.";
103 if( theDetector == 0 )
return( tecPlusData.at( theRing ).at( theBeam ).at( theDisk ) );
104 else return( tecMinusData.at( theRing ).at( theBeam ).at( theDisk ) );
120 if( !( ( theDetector == 2 || theDetector == 3 ) &&
121 ( theBeam >= 0 && theBeam < 8 ) &&
122 ( thePosition >= 0 && thePosition < 6 ) ) ) {
123 std::cerr <<
" [LASGlobalData::GetTIBTOBEntry] ** ERROR: illegal coordinates:" << std::endl;
124 std::cerr <<
" detector " << theDetector <<
", beam " << theBeam <<
", position " << thePosition <<
"." << std::endl;
125 throw " Bailing out.";
128 if( theDetector == 2 )
return( tibData.at( theBeam ).at( thePosition ) );
129 else return( tobData.at( theBeam ).at( thePosition ) );
145 if( !( ( theDetector == 0 || theDetector == 1 ) &&
146 ( theBeam >= 0 && theBeam < 8 ) &&
147 ( theDisk >= 0 && theDisk < 6 ) ) ) {
148 std::cerr <<
" [LASGlobalData::GetTEC2TECEntry] ** ERROR: illegal coordinates:" << std::endl;
149 std::cerr <<
" detector " << theDetector <<
", beam " << theBeam <<
", disk " << theDisk <<
"." << std::endl;
150 throw " Bailing out.";
153 if( theDetector == 0 )
return( tecPlusATData.at( theBeam ).at( theDisk ) );
154 else return( tecMinusATData.at( theBeam ).at( theDisk ) );
171 if( !( ( theDetector == 0 || theDetector == 1 ) &&
172 ( theRing == 0 || theRing == 1 ) &&
173 ( theBeam >= 0 && theBeam < 8 ) &&
174 ( theDisk >= 0 && theDisk < 9 ) ) ) {
175 std::cerr <<
" [LASGlobalData::SetTECEntry] ** ERROR: illegal coordinates:" << std::endl;
176 std::cerr <<
" detector " << theDetector <<
", ring " << theRing <<
", beam " << theBeam <<
", disk " << theDisk <<
"." << std::endl;
177 throw " Bailing out.";
180 if( theDetector == 0 ) tecPlusData.at( theRing ).at( theBeam ).at( theDisk ) = theEntry;
181 else tecMinusData.at( theRing ).at( theBeam ).at( theDisk ) = theEntry;
198 if( !( ( theDetector == 2 || theDetector == 3 ) &&
199 ( theBeam >= 0 && theBeam < 8 ) &&
200 ( thePosition >= 0 && thePosition < 6 ) ) ) {
201 std::cerr <<
" [LASGlobalData::SetTIBTOBEntry] ** ERROR: illegal coordinates:" << std::endl;
202 std::cerr <<
" detector " << theDetector <<
", beam " << theBeam <<
", position " << thePosition <<
"." << std::endl;
203 throw " Bailing out.";
206 if( theDetector == 2 ) tibData.at( theBeam ).at( thePosition ) = theEntry;
207 else tobData.at( theBeam ).at( thePosition ) = theEntry;
224 if( !( ( theDetector == 0 || theDetector == 1 ) &&
225 ( theBeam >= 0 && theBeam < 8 ) &&
226 ( theDisk >= 0 && theDisk < 6 ) ) ) {
227 std::cerr <<
" [LASGlobalData::SetTEC2TECEntry] ** ERROR: illegal coordinates:" << std::endl;
228 std::cerr <<
" detector " << theDetector <<
", beam " << theBeam <<
", disk " << theDisk <<
"." << std::endl;
229 throw " Bailing out.";
232 if( theDetector == 0 ) tecPlusATData.at( theBeam ).at( theDisk ) = theEntry;
233 else tecMinusATData.at( theBeam ).at( theDisk ) = theEntry;
285 tecPlusData.resize( 2 );
286 for(
unsigned int ring = 0;
ring < tecPlusData.size(); ++
ring ) {
287 tecPlusData.at(
ring ).resize( 8 );
288 for(
unsigned int beam = 0;
beam < tecPlusData.at(
ring ).size(); ++
beam ) {
289 tecPlusData.at(
ring ).at(
beam ).resize( 9 , in);
294 tecMinusData.resize( 2 );
295 for(
unsigned int ring = 0;
ring < tecMinusData.size(); ++
ring ) {
296 tecMinusData.at(
ring ).resize( 8 );
297 for(
unsigned int beam = 0;
beam < tecMinusData.at(
ring ).size(); ++
beam ) {
298 tecMinusData.at(
ring ).at(
beam ).resize( 9, in );
303 tecPlusATData.resize( 8 );
304 for(
unsigned int beam = 0;
beam < tecPlusATData.size(); ++
beam ) {
305 tecPlusATData.at(
beam ).resize( 5, in );
309 tecMinusATData.resize( 8 );
310 for(
unsigned int beam = 0;
beam < tecMinusATData.size(); ++
beam ) {
311 tecMinusATData.at(
beam ).resize( 5, in );
316 for(
unsigned int beam = 0;
beam < tibData.size(); ++
beam ) {
317 tibData.at(
beam ).resize( 6, in );
322 for(
unsigned int beam = 0;
beam < tobData.size(); ++
beam ) {
323 tobData.at(
beam ).resize( 6, in );
void SetTEC2TECEntry(int subdetector, int beam, int tecDisk, T)
std::vector< std::vector< std::vector< T > > > tecMinusData
std::vector< std::vector< T > > tibData
void Init(const T &in=T())
std::vector< std::vector< T > > tecMinusATData
ClassDef(LASGlobalData, 2)
std::vector< std::vector< std::vector< T > > > tecPlusData
T & GetTIBTOBEntry(int subdetector, int beam, int tibTobPosition)
void SetTIBTOBEntry(int subdetector, int beam, int tibTobPosition, T)
std::vector< std::vector< T > > tobData
T & GetTEC2TECEntry(int subdetector, int beam, int tecDisk)
std::vector< std::vector< T > > tecPlusATData
T & GetTECEntry(int subdetector, int tecRing, int beam, int tecDisk)
void SetTECEntry(int subdetector, int tecRing, int beam, int tecDisk, T)