CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/Alignment/CocoaDaq/src/CocoaDaqRootEvent.cc

Go to the documentation of this file.
00001 
00002 //
00003 //                       Alignment_Cocoa classes
00004 //                       =======================
00005 //
00006 // see Alignment_Cocoa.hh for class defintions
00007 //
00008 // Author: Gervasio Gomez
00009 //
00011 
00012 #include <iostream>
00013 #include "Alignment/CocoaDaq/interface/CocoaDaqRootEvent.h"
00014 
00015 ClassImp(AliDaqEventHeader)
00016 ClassImp(AliDaqPosition2D)
00017 ClassImp(AliDaqPositionCOPS)
00018 ClassImp(AliDaqTilt)
00019 ClassImp(AliDaqDistance)
00020 ClassImp(AliDaqTemperature)
00021 ClassImp(CocoaDaqRootEvent)
00022 
00023 //-----------------------------------------------------------------------------
00024 CocoaDaqRootEvent::CocoaDaqRootEvent()
00025 {
00026   Header = new AliDaqEventHeader();
00027   // define arrays of sensors
00028   numPosCOPS       = 0;
00029   numPos2D         = 0;
00030   numTilt        = 0;
00031   numDist          = 0;
00032   numTemp          = 0;
00033   Array_PositionCOPS = new TClonesArray("AliDaqPositionCOPS",50);
00034   Array_Position2D   = new TClonesArray("AliDaqPosition2D",50);
00035   Array_Tilt       = new TClonesArray("AliDaqTilt",50);
00036   Array_Dist         = new TClonesArray("AliDaqDistance",50);
00037   Array_Temp         = new TClonesArray("AliDaqTemperature",50);
00038 }
00039 
00040 //-----------------------------------------------------------------------------
00041 
00042 void CocoaDaqRootEvent::DumpIt()
00043 {
00044   // Dump to screen all Alignment info
00045   Header->DumpIt();
00046   for(int i=0;i<numPosCOPS;i++){
00047     AliDaqPositionCOPS *posCOPS = (AliDaqPositionCOPS*) Array_PositionCOPS->At(i); 
00048     posCOPS -> DumpIt(posCOPS->GetID());
00049   }
00050   for(int i=0;i<numPos2D;i++){
00051     AliDaqPosition2D *pos2D = (AliDaqPosition2D*) Array_Position2D->At(i); 
00052     pos2D -> DumpIt(pos2D->GetID());
00053   }
00054   for(int i=0;i<numTilt;i++){
00055     AliDaqTilt *tilt = (AliDaqTilt*) Array_Tilt->At(i); 
00056     tilt -> DumpIt(tilt->GetID());
00057   }
00058   for(int i=0;i<numDist;i++){
00059     AliDaqDistance *dist = (AliDaqDistance*) Array_Dist->At(i); 
00060     dist -> DumpIt(dist->GetID());
00061   }
00062   for(int i=0;i<numTemp;i++){
00063     AliDaqTemperature *temp = (AliDaqTemperature*) Array_Temp->At(i); 
00064     temp -> DumpIt(temp->GetID());
00065   }
00066 }
00067 
00068 //-----------------------------------------------------------------------------
00069 
00070 void AliDaqEventHeader::DumpIt()
00071 {
00072   std::cout<<std::endl;
00073   std::cout<<"------------------------------- Event Header ------------------------------"<<std::endl;
00074   std::cout<<"Time stamp    = "<<fTimeStamp<<std::endl;
00075   std::cout<<"Run number    = "<<fRunNum<<std::endl;
00076   std::cout<<"Event number  = "<<fEvtNum<<std::endl;
00077   std::cout<<std::endl;
00078 }
00079 
00080 //-----------------------------------------------------------------------------
00081 
00082 void AliDaqPosition2D::DumpIt(TString Name)
00083 {
00084   TString dashes = "------------------------------";
00085   TString line = dashes+Name+dashes;
00086   std::cout<<std::endl;
00087   std::cout<<line<<std::endl;
00088   std::cout<<"Time stamp = "<<fTimeStamp<<std::endl;
00089   std::cout<<"X          = "<<fX<<std::endl;
00090   std::cout<<"Y          = "<<fY<<std::endl;
00091   std::cout<<"X error    = "<<fX_error<<std::endl;
00092   std::cout<<"Y error    = "<<fY_error<<std::endl;
00093   std::cout<<"ID         = "<<fID<<std::endl;
00094   std::cout<<std::endl;
00095 }
00096 
00097 //-----------------------------------------------------------------------------
00098 
00099 void AliDaqPositionCOPS::DumpIt(TString Name)
00100 {
00101   TString dashes = "------------------------------";
00102   TString line = dashes+Name+dashes;
00103   std::cout<<std::endl;
00104   std::cout<<line<<std::endl;
00105   std::cout<<"Time stamp        = "<<fTimeStamp<<std::endl;
00106   std::cout<<"DCOPS_up          = "<<fDCOPS_up<<std::endl;
00107   std::cout<<"DCOPS_down        = "<<fDCOPS_down<<std::endl;
00108   std::cout<<"DCOPS_left        = "<<fDCOPS_left<<std::endl;
00109   std::cout<<"DCOPS_right       = "<<fDCOPS_right<<std::endl;
00110   std::cout<<"DCOPS_up_error    = "<<fDCOPS_up_error<<std::endl;
00111   std::cout<<"DCOPS_down_error  = "<<fDCOPS_down_error<<std::endl;
00112   std::cout<<"DCOPS_left_error  = "<<fDCOPS_left_error<<std::endl;
00113   std::cout<<"DCOPS_right_error = "<<fDCOPS_right_error<<std::endl;
00114   std::cout<<"ID                = "<<fID<<std::endl;
00115   std::cout<<std::endl;
00116 }
00117 
00118 //-----------------------------------------------------------------------------
00119 
00120 void AliDaqTilt::DumpIt(TString Name)
00121 {
00122   TString dashes = "------------------------------";
00123   TString line = dashes+Name+dashes;
00124   std::cout<<std::endl;
00125   std::cout<<line<<std::endl;
00126   std::cout<<"Time stamp = "<<fTimeStamp<<std::endl;
00127   std::cout<<"Tilt       = "<<fTilt<<std::endl;
00128   std::cout<<"Tilt error = "<<fTilt_error<<std::endl;
00129   std::cout<<"ID         = "<<fID<<std::endl;
00130   std::cout<<std::endl;
00131 }
00132 
00133 //-----------------------------------------------------------------------------
00134 
00135 void AliDaqDistance::DumpIt(TString Name)
00136 {
00137   TString dashes = "------------------------------";
00138   TString line = dashes+Name+dashes;
00139   std::cout<<std::endl;
00140   std::cout<<line<<std::endl;
00141   std::cout<<"Time stamp     = "<<fTimeStamp<<std::endl;
00142   std::cout<<"AliDaqDistance       = "<<fDistance<<std::endl;
00143   std::cout<<"AliDaqDistance error = "<<fDistance_error<<std::endl;
00144   std::cout<<"ID             = "<<fID<<std::endl;
00145   std::cout<<std::endl;
00146 }
00147 
00148 //-----------------------------------------------------------------------------
00149 
00150 void AliDaqTemperature::DumpIt(TString Name)
00151 {
00152   TString dashes = "------------------------------";
00153   TString line = dashes+Name+dashes;
00154   std::cout<<std::endl;
00155   std::cout<<line<<std::endl;
00156   std::cout<<"Time stamp        = "<<fTimeStamp<<std::endl;
00157   std::cout<<"AliDaqTemperature       = "<<fTemperature<<std::endl;
00158   std::cout<<"AliDaqTemperature error = "<<fTemperature_error<<std::endl;
00159   std::cout<<"ID                = "<<fID<<std::endl;
00160   std::cout<<std::endl;
00161 }
00162 
00163 //-----------------------------------------------------------------------------
00164