Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:44:24

0001 ////////////////////////////////////////////////////////////////////////
0002 //
0003 //                       Alignment_Cocoa classes
0004 //                       =======================
0005 //
0006 // see Alignment_Cocoa.hh for class defintions
0007 //
0008 // Author: Gervasio Gomez
0009 //
0010 ////////////////////////////////////////////////////////////////////////
0011 
0012 #include <iostream>
0013 #include "Alignment/CocoaDaq/interface/CocoaDaqRootEvent.h"
0014 
0015 ClassImp(AliDaqEventHeader);
0016 ClassImp(AliDaqPosition2D);
0017 ClassImp(AliDaqPositionCOPS);
0018 ClassImp(AliDaqTilt);
0019 ClassImp(AliDaqDistance);
0020 ClassImp(AliDaqTemperature);
0021 ClassImp(CocoaDaqRootEvent);
0022 
0023 //-----------------------------------------------------------------------------
0024 CocoaDaqRootEvent::CocoaDaqRootEvent() {
0025   Header = new AliDaqEventHeader();
0026   // define arrays of sensors
0027   numPosCOPS = 0;
0028   numPos2D = 0;
0029   numTilt = 0;
0030   numDist = 0;
0031   numTemp = 0;
0032   Array_PositionCOPS = new TClonesArray("AliDaqPositionCOPS", 50);
0033   Array_Position2D = new TClonesArray("AliDaqPosition2D", 50);
0034   Array_Tilt = new TClonesArray("AliDaqTilt", 50);
0035   Array_Dist = new TClonesArray("AliDaqDistance", 50);
0036   Array_Temp = new TClonesArray("AliDaqTemperature", 50);
0037 }
0038 
0039 //-----------------------------------------------------------------------------
0040 
0041 void CocoaDaqRootEvent::DumpIt() {
0042   // Dump to screen all Alignment info
0043   Header->DumpIt();
0044   for (int i = 0; i < numPosCOPS; i++) {
0045     AliDaqPositionCOPS* posCOPS = (AliDaqPositionCOPS*)Array_PositionCOPS->At(i);
0046     posCOPS->DumpIt(posCOPS->GetID());
0047   }
0048   for (int i = 0; i < numPos2D; i++) {
0049     AliDaqPosition2D* pos2D = (AliDaqPosition2D*)Array_Position2D->At(i);
0050     pos2D->DumpIt(pos2D->GetID());
0051   }
0052   for (int i = 0; i < numTilt; i++) {
0053     AliDaqTilt* tilt = (AliDaqTilt*)Array_Tilt->At(i);
0054     tilt->DumpIt(tilt->GetID());
0055   }
0056   for (int i = 0; i < numDist; i++) {
0057     AliDaqDistance* dist = (AliDaqDistance*)Array_Dist->At(i);
0058     dist->DumpIt(dist->GetID());
0059   }
0060   for (int i = 0; i < numTemp; i++) {
0061     AliDaqTemperature* temp = (AliDaqTemperature*)Array_Temp->At(i);
0062     temp->DumpIt(temp->GetID());
0063   }
0064 }
0065 
0066 //-----------------------------------------------------------------------------
0067 
0068 void AliDaqEventHeader::DumpIt() {
0069   std::cout << std::endl;
0070   std::cout << "------------------------------- Event Header ------------------------------" << std::endl;
0071   std::cout << "Time stamp    = " << fTimeStamp << std::endl;
0072   std::cout << "Run number    = " << fRunNum << std::endl;
0073   std::cout << "Event number  = " << fEvtNum << std::endl;
0074   std::cout << std::endl;
0075 }
0076 
0077 //-----------------------------------------------------------------------------
0078 
0079 void AliDaqPosition2D::DumpIt(const TString& Name) {
0080   TString dashes = "------------------------------";
0081   TString line = dashes + Name + dashes;
0082   std::cout << std::endl;
0083   std::cout << line << std::endl;
0084   std::cout << "Time stamp = " << fTimeStamp << std::endl;
0085   std::cout << "X          = " << fX << std::endl;
0086   std::cout << "Y          = " << fY << std::endl;
0087   std::cout << "X error    = " << fX_error << std::endl;
0088   std::cout << "Y error    = " << fY_error << std::endl;
0089   std::cout << "ID         = " << fID << std::endl;
0090   std::cout << std::endl;
0091 }
0092 
0093 //-----------------------------------------------------------------------------
0094 
0095 void AliDaqPositionCOPS::DumpIt(const TString& Name) {
0096   TString dashes = "------------------------------";
0097   TString line = dashes + Name + dashes;
0098   std::cout << std::endl;
0099   std::cout << line << std::endl;
0100   std::cout << "Time stamp        = " << fTimeStamp << std::endl;
0101   std::cout << "DCOPS_up          = " << fDCOPS_up << std::endl;
0102   std::cout << "DCOPS_down        = " << fDCOPS_down << std::endl;
0103   std::cout << "DCOPS_left        = " << fDCOPS_left << std::endl;
0104   std::cout << "DCOPS_right       = " << fDCOPS_right << std::endl;
0105   std::cout << "DCOPS_up_error    = " << fDCOPS_up_error << std::endl;
0106   std::cout << "DCOPS_down_error  = " << fDCOPS_down_error << std::endl;
0107   std::cout << "DCOPS_left_error  = " << fDCOPS_left_error << std::endl;
0108   std::cout << "DCOPS_right_error = " << fDCOPS_right_error << std::endl;
0109   std::cout << "ID                = " << fID << std::endl;
0110   std::cout << std::endl;
0111 }
0112 
0113 //-----------------------------------------------------------------------------
0114 
0115 void AliDaqTilt::DumpIt(const TString& Name) {
0116   TString dashes = "------------------------------";
0117   TString line = dashes + Name + dashes;
0118   std::cout << std::endl;
0119   std::cout << line << std::endl;
0120   std::cout << "Time stamp = " << fTimeStamp << std::endl;
0121   std::cout << "Tilt       = " << fTilt << std::endl;
0122   std::cout << "Tilt error = " << fTilt_error << std::endl;
0123   std::cout << "ID         = " << fID << std::endl;
0124   std::cout << std::endl;
0125 }
0126 
0127 //-----------------------------------------------------------------------------
0128 
0129 void AliDaqDistance::DumpIt(const TString& Name) {
0130   TString dashes = "------------------------------";
0131   TString line = dashes + Name + dashes;
0132   std::cout << std::endl;
0133   std::cout << line << std::endl;
0134   std::cout << "Time stamp     = " << fTimeStamp << std::endl;
0135   std::cout << "AliDaqDistance       = " << fDistance << std::endl;
0136   std::cout << "AliDaqDistance error = " << fDistance_error << std::endl;
0137   std::cout << "ID             = " << fID << std::endl;
0138   std::cout << std::endl;
0139 }
0140 
0141 //-----------------------------------------------------------------------------
0142 
0143 void AliDaqTemperature::DumpIt(const TString& Name) {
0144   TString dashes = "------------------------------";
0145   TString line = dashes + Name + dashes;
0146   std::cout << std::endl;
0147   std::cout << line << std::endl;
0148   std::cout << "Time stamp        = " << fTimeStamp << std::endl;
0149   std::cout << "AliDaqTemperature       = " << fTemperature << std::endl;
0150   std::cout << "AliDaqTemperature error = " << fTemperature_error << std::endl;
0151   std::cout << "ID                = " << fID << std::endl;
0152   std::cout << std::endl;
0153 }
0154 
0155 //-----------------------------------------------------------------------------