CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes

ME Class Reference

#include <ME.h>

List of all members.

Classes

struct  Header
struct  Settings

Public Types

enum  {
  iLmfLaserRun, iLmfLaserConfig, iLmfLaserPulse, iLmfLaserPrim,
  iLmfLaserPnPrim, iLmfTestPulseRun, iLmfTestPulseConfig, iLmfTestPulsePrim,
  iLmfTestPulsePnPrim, iSizeLmf
}
enum  {
  iAPD_FLAG, iAPD_MEAN, iAPD_RMS, iAPD_M3,
  iAPD_OVER_PNA_MEAN, iAPD_OVER_PNA_RMS, iAPD_OVER_PNA_M3, iAPD_OVER_PNB_MEAN,
  iAPD_OVER_PNB_RMS, iAPD_OVER_PNB_M3, iAPD_OVER_PN_MEAN, iAPD_OVER_PN_RMS,
  iAPD_OVER_PN_M3, iAPD_SHAPE_COR, iAPD_ALPHA, iAPD_BETA,
  iAPD_TIME_MEAN, iAPD_TIME_RMS, iAPD_TIME_M3, iAPD_TIME_NEVT,
  iSizeAPD
}
enum  {
  iPN_FLAG, iPN_MEAN, iPN_RMS, iPN_M3,
  iPNA_OVER_PNB_MEAN, iPNA_OVER_PNB_RMS, iPNA_OVER_PNB_M3, iSizePN
}
enum  {
  iMTQ_FIT_METHOD, iMTQ_AMPL, iMTQ_TIME, iMTQ_RISE,
  iMTQ_FWHM, iMTQ_FW20, iMTQ_FW80, iMTQ_SLIDING,
  iSizeMTQ
}
enum  {
  iTPAPD_FLAG, iTPAPD_MEAN, iTPAPD_RMS, iTPAPD_M3,
  iTPAPD_NEVT, iSizeTPAPD
}
enum  {
  iTPPN_GAIN, iTPPN_MEAN, iTPPN_RMS, iTPPN_M3,
  iSizeTPPN
}
enum  Color {
  iBlue = 0, iGreen, iRed, iIRed,
  iLED1, iLED2, iSizeC
}
typedef int DCCid
enum  EcalElec { iElectronicChannel = iSizeG, iHVChannel, iLVChannel, iSizeU }
enum  EcalRegion {
  iEEM = 0, iEBM, iEBP, iEEP,
  iSizeE
}
enum  EcalUnit {
  iEcalRegion = 0, iSector, iLMRegion, iLMModule,
  iSuperCrystal, iCrystal, iSizeG
}
enum  Gain { iVfeGain12 = 1, iVfeGain6, iVfeGain1, iSizeVfeGain }
typedef int LMMid
typedef int LMRid
enum  PN { iPNA = 0, iPNB }
enum  PNGain { iPnGain1 = 0, iPnGain16, iSizePnGain }
typedef int PNid
enum  RunType { iLaser = 0, iTestPulse, iSizeT }
typedef unsigned long Time
typedef unsigned long long TimeStamp
enum  TUnit {
  iDay, iHour, iMinute, iSecond,
  iSizeTU
}

Public Member Functions

virtual ~ME ()

Static Public Member Functions

static std::vector< int > apdRefChannels (ME::LMMid ilmmod, ME::LMRid ilmr)
static std::pair< int, int > dccAndSide (int ilmr)
static int ecalRegion (int ilmr)
static bool isBarrel (int ilmr)
static TString lmdataPath (int lmr)
static std::vector< ME::LMMidlmmodFromDcc (ME::DCCid idcc)
static std::vector< ME::LMMidlmmodFromLmr (ME::LMRid ilmr)
static int lmr (int idcc, int iside)
static MEChannellmrTree (int ilmr)
static std::vector< ME::DCCidmemFromDcc (ME::DCCid idcc)
static std::pair< ME::DCCid,
ME::DCCid
memFromLmr (ME::LMRid ilmr)
static TString path ()
static std::pair< ME::DCCid,
ME::PNid
pn (ME::LMRid ilmr, ME::LMMid ilmmod, ME::PN ipn)
static TString primPath (int lmr)
static void regionAndSector (int ilmr, int &ireg, int &isect, int &idcc, int &iside)
static MEChannelregTree (int ireg)
static TString rootFileName (ME::Header header, ME::Settings settings)
static TString runListName (int lmr, int type, int color)
static TString smName (int ireg, int ism)
static TString smName (int ilmr)
static TString smNameFromDcc (int idcc)
static Time time (float dt, Time t0, int tunit=iHour)
static Time time_high (TimeStamp t)
static Time time_low (TimeStamp t)
static std::vector< TimetimeDiff (Time t1, Time t2, short int &sign)
static float timeDiff (Time t1, Time t0, int tunit=iHour)

Static Public Attributes

static std::vector< MEChannel * > _trees = std::vector<MEChannel*>(4,(MEChannel*)0)
static TString APDPrimVar [iSizeAPD]
static TString color [iSizeC]
static TString granularity [iSizeG]
static const TimeStamp kLowMask = 0xFFFFFFFF
static TString MTQPrimVar [iSizeMTQ]
static TString PNPrimVar [iSizePN]
static TString region [4]
static TString TPAPDPrimVar [iSizeTPAPD]
static TString TPPNPrimVar [iSizeTPPN]
static TString type [iSizeT]
static bool useElectronicNumbering = false

Detailed Description

Definition at line 11 of file ME.h.


Member Typedef Documentation

typedef int ME::DCCid

Definition at line 42 of file ME.h.

typedef int ME::LMMid

Definition at line 44 of file ME.h.

typedef int ME::LMRid

Definition at line 43 of file ME.h.

typedef int ME::PNid

Definition at line 45 of file ME.h.

typedef unsigned long ME::Time

Definition at line 74 of file ME.h.

typedef unsigned long long ME::TimeStamp

Definition at line 75 of file ME.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
iLmfLaserRun 
iLmfLaserConfig 
iLmfLaserPulse 
iLmfLaserPrim 
iLmfLaserPnPrim 
iLmfTestPulseRun 
iLmfTestPulseConfig 
iLmfTestPulsePrim 
iLmfTestPulsePnPrim 
iSizeLmf 

Definition at line 91 of file ME.h.

anonymous enum
Enumerator:
iAPD_FLAG 
iAPD_MEAN 
iAPD_RMS 
iAPD_M3 
iAPD_OVER_PNA_MEAN 
iAPD_OVER_PNA_RMS 
iAPD_OVER_PNA_M3 
iAPD_OVER_PNB_MEAN 
iAPD_OVER_PNB_RMS 
iAPD_OVER_PNB_M3 
iAPD_OVER_PN_MEAN 
iAPD_OVER_PN_RMS 
iAPD_OVER_PN_M3 
iAPD_SHAPE_COR 
iAPD_ALPHA 
iAPD_BETA 
iAPD_TIME_MEAN 
iAPD_TIME_RMS 
iAPD_TIME_M3 
iAPD_TIME_NEVT 
iSizeAPD 

Definition at line 103 of file ME.h.

anonymous enum
Enumerator:
iPN_FLAG 
iPN_MEAN 
iPN_RMS 
iPN_M3 
iPNA_OVER_PNB_MEAN 
iPNA_OVER_PNB_RMS 
iPNA_OVER_PNB_M3 
iSizePN 

Definition at line 113 of file ME.h.

anonymous enum
Enumerator:
iMTQ_FIT_METHOD 
iMTQ_AMPL 
iMTQ_TIME 
iMTQ_RISE 
iMTQ_FWHM 
iMTQ_FW20 
iMTQ_FW80 
iMTQ_SLIDING 
iSizeMTQ 

Definition at line 119 of file ME.h.

anonymous enum
Enumerator:
iTPAPD_FLAG 
iTPAPD_MEAN 
iTPAPD_RMS 
iTPAPD_M3 
iTPAPD_NEVT 
iSizeTPAPD 

Definition at line 126 of file ME.h.

anonymous enum
Enumerator:
iTPPN_GAIN 
iTPPN_MEAN 
iTPPN_RMS 
iTPPN_M3 
iSizeTPPN 

Definition at line 131 of file ME.h.

enum ME::Color
Enumerator:
iBlue 
iGreen 
iRed 
iIRed 
iLED1 
iLED2 
iSizeC 

Definition at line 70 of file ME.h.

Enumerator:
iElectronicChannel 
iHVChannel 
iLVChannel 
iSizeU 

Definition at line 21 of file ME.h.

Enumerator:
iEEM 
iEBM 
iEBP 
iEEP 
iSizeE 

Definition at line 16 of file ME.h.

{ iEEM=0, iEBM, iEBP, iEEP, iSizeE };
Enumerator:
iEcalRegion 
iSector 
iLMRegion 
iLMModule 
iSuperCrystal 
iCrystal 
iSizeG 

Definition at line 18 of file ME.h.

enum ME::Gain
Enumerator:
iVfeGain12 
iVfeGain6 
iVfeGain1 
iSizeVfeGain 

Definition at line 71 of file ME.h.

enum ME::PN
Enumerator:
iPNA 
iPNB 

Definition at line 46 of file ME.h.

{ iPNA=0, iPNB };
enum ME::PNGain
Enumerator:
iPnGain1 
iPnGain16 
iSizePnGain 

Definition at line 72 of file ME.h.

Enumerator:
iLaser 
iTestPulse 
iSizeT 

Definition at line 69 of file ME.h.

enum ME::TUnit
Enumerator:
iDay 
iHour 
iMinute 
iSecond 
iSizeTU 

Definition at line 136 of file ME.h.


Constructor & Destructor Documentation

virtual ME::~ME ( ) [inline, virtual]

Definition at line 154 of file ME.h.

{}

Member Function Documentation

static std::vector< int> ME::apdRefChannels ( ME::LMMid  ilmmod,
ME::LMRid  ilmr 
) [static]
std::pair< int, int > ME::dccAndSide ( int  ilmr) [static]

Definition at line 313 of file ME.cc.

Referenced by MEEBGeom::lmmodFromLmr(), MEEBGeom::memFromLmr(), and MEChannel::oneLine().

{
  int idcc=0;
  int side=0;

  int ireg = ecalRegion( ilmr );
  if( ireg==iEEM ) ilmr-=82; 
  else if( ireg==iEBP ) ilmr-=36; 
  else if( ireg==iEEP ) ilmr-=72; 

  if( ireg==iEEM || ireg==iEEP )
    {
      assert( ilmr>=1 && ilmr<=10 );
      side = 0;
      idcc = ilmr;
      if( ilmr>=9 ) idcc--; 
      if( ilmr==9 ) side=1;
    }
  else 
    {
      assert( ilmr>=1 && ilmr<=36 );
      idcc = (ilmr-1)/2+1;
      side = (ilmr-1)%2;
    }

  if( ireg>iEEM ) idcc+=9; 
  if( ireg>iEBM ) idcc+=18; 
  if( ireg>iEBP ) idcc+=18; 
  
  //  idcc += 600;

  return std::pair< int,int >( idcc, side );
}
int ME::ecalRegion ( int  ilmr) [static]

Definition at line 249 of file ME.cc.

{
  assert( ilmr>0 && ilmr<=92 );
  if( ilmr<=36 ) return iEBM;
  ilmr-=36;
  if( ilmr<=36 ) return iEBP;
  ilmr-=36;
  if( ilmr<=10 ) return iEEP;
  return iEEM;
}
bool ME::isBarrel ( int  ilmr) [static]

Definition at line 569 of file ME.cc.

{
  int reg_ = ecalRegion( ilmr );
  if     ( reg_==iEEM || reg_==iEEP ) return false;
  else if( reg_==iEBM || reg_==iEBP ) return true;
  else abort();
  return true;
}
TString ME::lmdataPath ( int  lmr) [static]

Definition at line 62 of file ME.cc.

References smName().

{
  TString out_(getenv("MELMDAT"));
  out_ += "/";
  out_ += ME::smName(lmr);
  out_ += "/";
  return out_;
}
std::vector< int > ME::lmmodFromDcc ( ME::DCCid  idcc) [static]

Definition at line 623 of file ME.cc.

Referenced by EcalLaserAnalyzer::EcalLaserAnalyzer(), EcalLaserAnalyzer2::EcalLaserAnalyzer2(), and EcalTestPulseAnalyzer::EcalTestPulseAnalyzer().

{  
  std::vector<int> vec;
  for( int iside=0; iside<=1;  iside++ )
    {
      int ilmr = lmr( idcc, iside );
      if( ilmr<0 ) continue;
      bool isBarrel_ = isBarrel( ilmr );
      std::vector< int > vec_ = lmmodFromLmr( ilmr );
      for( unsigned ii=0; ii<vec_.size(); ii++ )
        {
          int ilmmod_ = vec_[ii];
          if( !isBarrel_ )
            {
              // special case for Julie
              if( ilmmod_==18 && iside==1 ) ilmmod_=20;
              if( ilmmod_==19 && iside==1 ) ilmmod_=21;
            }
          vec.push_back( ilmmod_ );
        }
    }
  return vec;
}
static std::vector<ME::LMMid> ME::lmmodFromLmr ( ME::LMRid  ilmr) [static]
int ME::lmr ( int  idcc,
int  iside 
) [static]

Definition at line 261 of file ME.cc.

Referenced by MELaserPrim::MELaserPrim(), and rootFileName().

{
  int ilmr=0;
  
  assert( side==0 || side==1 );

  if( idcc>600 ) idcc-=600;
  assert( idcc>=1 && idcc<=54 );
  int ireg; 
  if( idcc<=9 ) ireg = iEEM;
  else 
    {
      idcc -= 9;
      if( idcc<=18 ) ireg = iEBM;
      else
        {
          idcc -= 18;
          if( idcc<=18 ) ireg = iEBP;
          else
            {
              idcc -= 18;
              if( idcc<=9 ) ireg = iEEP;
              else
                abort();
            }
        }
    }
  if( ireg==iEEM || ireg==iEEP )
    {
      if( side==1 && idcc!=8 ) 
        {
          return -1;      
        }
      ilmr = idcc;
      if( idcc==9 ) ilmr++;
      if( idcc==8 && side==1 ) ilmr++;
    }
  else if( ireg==iEBM || ireg==iEBP )
    {
      ilmr = 2*(idcc-1) + side + 1;
    }
  else
    abort();

  if( ireg==iEBP ) ilmr+=36; 
  else if( ireg==iEEP ) ilmr+=72; 
  else if( ireg==iEEM ) ilmr+=82; 

  return ilmr;
}
MEChannel * ME::lmrTree ( int  ilmr) [static]

Definition at line 435 of file ME.cc.

References MEChannel::getDescendant().

{
  return regTree( ecalRegion( ilmr ) )->getDescendant( iLMRegion, ilmr );
}
std::vector< int > ME::memFromDcc ( ME::DCCid  idcc) [static]

Definition at line 608 of file ME.cc.

Referenced by EcalTestPulseAnalyzer::EcalTestPulseAnalyzer(), and TMem::init().

{
  std::vector<int> vec;
  for( int iside=0; iside<=1;  iside++ )
    {
      int ilmr = lmr( idcc, iside );
      if( ilmr<0 ) continue;
      std::pair< int, int > mem_ = memFromLmr( ilmr );
      vec.push_back( mem_.first  );
      vec.push_back( mem_.second );
    }
  return vec;
}
static std::pair<ME::DCCid,ME::DCCid> ME::memFromLmr ( ME::LMRid  ilmr) [static]

Referenced by TMem::Mem().

TString ME::path ( ) [static]

Definition at line 82 of file ME.cc.

{
  return TString(getenv("MUSECAL"))+"/";
}
static std::pair<ME::DCCid,ME::PNid> ME::pn ( ME::LMRid  ilmr,
ME::LMMid  ilmmod,
ME::PN  ipn 
) [static]
TString ME::primPath ( int  lmr) [static]

Definition at line 72 of file ME.cc.

References smName().

{
  TString out_(getenv("MESTORE"));
  out_ += "/";
  out_ += ME::smName(lmr);
  out_ += "/";
  return out_;
}
void ME::regionAndSector ( int  ilmr,
int &  ireg,
int &  isect,
int &  idcc,
int &  iside 
) [static]

Definition at line 348 of file ME.cc.

Referenced by MEGeom::getBoundary(), MEGeom::getHist(), MELaserPrim::MELaserPrim(), and smName().

{
  ireg = ecalRegion( ilmr );

  std::pair< int, int > ipair_ = dccAndSide( ilmr );
  idcc = ipair_.first;
  side = ipair_.second;

  ism = 0;
  if( ireg==iEEM || ireg==iEEP )
    {
      if( idcc>600 ) idcc-=600;  // also works with FEDids
      if( idcc>=1 && idcc<=9 )
        {
          ism = 6+idcc;
          if( ism>9 ) ism-=9;
          ism+=9;
        }
      else if( idcc>=46 && idcc<=54 )
        {
          ism = idcc-46+7;
          if( ism>9 ) ism-=9;
        }
      else
        abort();
    }
  else if( ireg==iEBM || ireg==iEBP )
    {
      if( idcc>600 ) idcc-=600;  // also works with FEDids
      assert( idcc>=10 && idcc<=45 );
      ism=idcc-9;
      if( ism>18 ) ism-=18;
      else         ism+=18;
    }
  else
    abort();
}
MEChannel * ME::regTree ( int  ireg) [static]

Definition at line 441 of file ME.cc.

References MEEEGeom::crystal(), MEEBGeom::crystal_channel(), MEEBGeom::electronic_channel(), MEChannel::getDaughter(), MEEBGeom::globalCoord(), MEEBGeom::lm_channel(), MEEEGeom::lmmod(), MEEEGeom::lmr(), MEEBGeom::lmr(), MEEEGeom::sc(), MEEEGeom::sm(), and MEEBGeom::tt_channel().

{
  assert( ireg>=iEEM && ireg<=iEEP );
  if( _trees[ireg]!=0 ) return _trees[ireg];

  int iEcalRegion_      = ireg;
  int iSector_          = 0;
  int iLMRegion_        = 0;
  int iLMModule_        = 0;
  int iSuperCrystal_    = 0;
  int iCrystal_         = 0;
  MEChannel* leaf_(0);
  MEChannel* tree_(0);

  if( iEcalRegion_==iEBM || iEcalRegion_==iEBP )
    {
      for( int isect=1; isect<=18; isect++ )
        {
          iSector_ = isect;
          if( iEcalRegion_==iEBM ) iSector_+=18; 
          if( _trees[iEcalRegion_]==0 )
            {
              //              std::cout << "Building the tree of crystals -- " 
              //                   << ME::region[iEcalRegion_];  
              _trees[iEcalRegion_] = new MEChannel( 0, 0, iEcalRegion_, 0 ); 
            }
          tree_=_trees[iEcalRegion_]; 
          for( int iX=0; iX<17; iX++ )
            {
              for( int iY=0; iY<4; iY++ )
                {
                  iSuperCrystal_ = MEEBGeom::tt_channel( iX, iY ); 
                  iLMModule_     = MEEBGeom::lm_channel( iX, iY );
                  for( int jx=0; jx<5; jx++ )
                    {
                      for( int jy=0; jy<5; jy++ )
                        {
                          int ix=5*iX+jx;
                          int iy=5*iY+jy;
                          if( useElectronicNumbering )
                            {
                              iCrystal_ = MEEBGeom::electronic_channel(ix,iy);
                            }
                          else
                            {
                              iCrystal_ = MEEBGeom::crystal_channel(ix,iy);
                            }
                          MEEBGeom::EtaPhiCoord globalCoord = 
                            MEEBGeom::globalCoord( iSector_, ix, iy );
                          int ieta = globalCoord.first;
                          int iphi = globalCoord.second;
                          iLMRegion_ = MEEBGeom::lmr( ieta, iphi );
                          leaf_ = tree_;                  
                          leaf_ = leaf_->getDaughter( ieta, iphi, iSector_       );
                          leaf_ = leaf_->getDaughter( ieta, iphi, iLMRegion_     );
                          leaf_ = leaf_->getDaughter( ieta, iphi, iLMModule_     );
                          leaf_ = leaf_->getDaughter( ieta, iphi, iSuperCrystal_ );
                          leaf_ = leaf_->getDaughter( ieta, iphi, iCrystal_      );
                        }
                    }
                }
            }
        }
    }
  else if( iEcalRegion_==iEEM || iEcalRegion_==iEEP )
    {
      int iz=1;
      if( iEcalRegion_==iEEM ) iz=-1;
      if( _trees[iEcalRegion_]==0 )
        {
          //      std::cout << "Building the tree of crystals -- " 
          //           << ME::region[iEcalRegion_];  
          _trees[iEcalRegion_] = new MEChannel( 0, 0, iEcalRegion_, 0 ); 
        }
      tree_=_trees[iEcalRegion_]; 

      for( int ilmr=72; ilmr<=92; ilmr++ )  // force the order of Monitoring Regions
        {
          if( ecalRegion( ilmr )!=iEcalRegion_ ) continue;
          for( int ilmm=1; ilmm<=19; ilmm++ ) // force the order of Monitoring Modules
            {
              for( int iXX=1; iXX<=10; iXX++ )
                {
                  for( int iside=1; iside<=2; iside++ )  // symmetrize wrt y-axis
                    {
                      int iX=iXX;
                      if( iside==2 ) iX = 20-iXX+1;
                      for( int iY=1; iY<=20; iY++ )
                        {
                          //int iSector_   = MEEEGeom::sector( iX, iY );
                          int iSector_   = MEEEGeom::sm( iX, iY, iz );
                          if( iSector_<0 ) continue;
                          iLMRegion_ = MEEEGeom::lmr( iX, iY, iz );
                          if( iLMRegion_!=ilmr ) continue;
                          iLMModule_ = MEEEGeom::lmmod( iX, iY );
                          if( iLMModule_!=ilmm ) continue;
                          iSuperCrystal_ = MEEEGeom::sc( iX, iY );

                          for( int jxx=1; jxx<=5; jxx++ )
                            {
                              int jx = jxx;  // symmetrize...
                              if( iside==2 ) jx = 5-jxx+1;

                              for( int jy=1; jy<=5; jy++ )
                                {
                                  int ix = 5*(iX-1)+jx;
                                  int iy = 5*(iY-1)+jy;
                                  iCrystal_ = MEEEGeom::crystal( ix, iy );
                                  if( iCrystal_<0 ) continue;
                                  leaf_ = tree_;                  
                                  leaf_ = leaf_->getDaughter( ix, iy, iSector_       );
                                  leaf_ = leaf_->getDaughter( ix, iy, iLMRegion_     );
                                  leaf_ = leaf_->getDaughter( ix, iy, iLMModule_     );
                                  leaf_ = leaf_->getDaughter( ix, iy, iSuperCrystal_ );
                                  leaf_ = leaf_->getDaughter( ix, iy, iCrystal_      );
                                }
                            }
                        }
                    }
                }
            }
        }
    }
  //  std::cout << ".... done" << std::endl;  
  return _trees[iEcalRegion_];
}
TString ME::rootFileName ( ME::Header  header,
ME::Settings  settings 
) [static]

Definition at line 88 of file ME.cc.

References iLaser, iTestPulse, lmr(), and smName().

{
  // get the laser monitoring region and super-module
  int lmr_   = ME::lmr( header.dcc, header.side );
  TString outfile_ = primPath( lmr_ );
  outfile_ += "LMF_";
  outfile_ += ME::smName( lmr_ );
  outfile_ += "_"; outfile_ += header.side; 
  if( settings.type==ME::iLaser )
    {
      switch( settings.wavelength )
        {
        case iBlue:   outfile_ += "_BlueLaser"; break;
        case iGreen:  outfile_ += "_GreenLaser";  break;
        case iRed:    outfile_ += "_RedLaser";  break;
        case iIRed:   outfile_ += "_IRedLaser";  break;
        default: break;
        }
    }
  else if( settings.type==ME::iTestPulse )
    {
      outfile_ += "_testPulse"; 
    }
  outfile_ += "_";      outfile_ += header.rundir.c_str();
  outfile_ += "_TS";    outfile_ += header.ts_beg;
  outfile_ += ".root";
  return outfile_;
}
TString ME::runListName ( int  lmr,
int  type,
int  color 
) [static]

Definition at line 118 of file ME.cc.

References iBlue, iGreen, iIRed, and iRed.

{
  TString outfile_ = primPath( lmr ); 
  if( type==iLaser )
    {
      outfile_ += "runlist_";
      switch( color ) 
        {
        case ME::iBlue:   outfile_+="Blue_"; break;
        case ME::iGreen:  outfile_+="Red_";  break;
        case ME::iRed:    outfile_+="Red_";  break;
        case ME::iIRed:   outfile_+="IRed_";  break;
        default: abort();
        }
      outfile_ += "Laser";
    }
  else if( type==iTestPulse )
    {
      outfile_  += "runlist_Test_Pulse";
    }
  return outfile_;
}
TString ME::smName ( int  ireg,
int  ism 
) [static]

Definition at line 387 of file ME.cc.

References iEBM, iEBP, iEEM, iEEP, ecalpyutils::ism(), and dbtoconf::out.

{
  TString out;
  if( ireg==ME::iEEM || ireg==ME::iEEP )
    {
      assert( ism>=1 && ism<=18 );
      out = "EE+";
      if( ireg==ME::iEEM ) out = "EE-";
      if( ism>9 )          ism -= 9;
      out += ism;
     }
  else if( ireg==ME::iEBM || ireg==ME::iEBP ) 
    {
      assert( ism>=1 && ism<=36 );
      out = "EB+";
      if( ism>18 )
        {
          out = "EB-";
          ism -= 18;
        }
      out += ism;
    }
  else
    abort();
  return out;
}
TString ME::smName ( int  ilmr) [static]

Definition at line 415 of file ME.cc.

References dbtoconf::out, and regionAndSector().

Referenced by lmdataPath(), MELaserPrim::MELaserPrim(), MEChannel::oneLine(), primPath(), and rootFileName().

{
  TString out;
  int reg_(0);
  int sm_(0);
  int dcc_(0);
  int side_(0);
  ME::regionAndSector( ilmr, reg_, sm_, dcc_, side_ );
  out = smName( reg_, sm_ );
  return out;
}
TString ME::smNameFromDcc ( int  idcc) [static]

Definition at line 428 of file ME.cc.

{
  int ilmr = lmr( idcc,0 );
  return smName( ilmr );
}
ME::Time ME::time ( float  dt,
Time  t0,
int  tunit = iHour 
) [static]

Definition at line 208 of file ME.cc.

References gather_cfg::cout, and dt.

{
  short int sign = 1;
  if( dt<0 ) sign = -1;
  float t_ = sign*dt;
  switch( tunit )
    {
    case iDay:
      t_*=86400;
      break;
    case iHour:
      t_*=3600;
      break;
    case iMinute:
      t_*=60;
      break;
    };
  ME::Time it_ = static_cast<ME::Time>(t_);
  std::cout << "dt/it/t0/ " << dt << "/" << it_ << "/" << t0 << std::endl; 
  if( sign==1 ) return t0+it_;
  else          return t0-it_;
}
ME::Time ME::time_high ( TimeStamp  t) [static]

Definition at line 238 of file ME.cc.

Referenced by MELaserPrim::fillHistograms().

{
  return static_cast<Time>(t>>32);
}
ME::Time ME::time_low ( TimeStamp  t) [static]

Definition at line 232 of file ME.cc.

References cond::time::kLowMask(), and matplotRender::t.

Referenced by MELaserPrim::fillHistograms().

{
  return static_cast<Time>(kLowMask&t);
}
std::vector< ME::Time > ME::timeDiff ( Time  t1,
Time  t2,
short int &  sign 
) [static]

Definition at line 142 of file ME.cc.

{
  sign = 1;
  //  Time t1 = time_high( T1 );
  //  Time t2 = time_high( T2 );
  Time dt_s(0);
  if( t1>t2 )
    { 
      dt_s = t1-t2;
    }
  else
    { 
      sign = -1;
      dt_s = t2-t1;
    }
  Time dt_min = dt_s/60;
  Time n_s    = dt_s-dt_min*60;
  Time dt_h   = dt_min/60;
  Time n_min  = dt_min-dt_h*60;
  Time dt_day = dt_h/24;
  Time n_h    = dt_h-dt_day*24;
  Time n_day  = dt_day;
  

  std::vector< Time > vec_;
  vec_.push_back( n_day );
  vec_.push_back( n_h   );
  vec_.push_back( n_min );
  vec_.push_back( n_s   );

  return vec_;
}
float ME::timeDiff ( Time  t1,
Time  t0,
int  tunit = iHour 
) [static]

Definition at line 176 of file ME.cc.

References dt.

{
  float sign = 1.;
  Time dt(0);
  if( t1>t0 )
    { 
      dt = t1-t0;
    }
  else
    { 
      sign = -1.;
      dt = t0-t1;
    }
  float dt_f = ((float) dt)*sign;
  switch( tunit )
    {
    case iDay:
      return dt_f/86400.;
      break;
    case iHour:
      return dt_f/3600.;
      break;
    case iMinute:
      return dt_f/60.;
      break;
    default:
      return dt_f;
    };
  return 0;
}

Member Data Documentation

std::vector< MEChannel * > ME::_trees = std::vector<MEChannel*>(4,(MEChannel*)0) [static]

Definition at line 156 of file ME.h.

TString ME::APDPrimVar [static]
Initial value:
 {
  "FLAG", "MEAN", "RMS", "M3", 
  "APD_OVER_PNA_MEAN", "APD_OVER_PNA_RMS", "APD_OVER_PNA_M3",
  "APD_OVER_PNB_MEAN", "APD_OVER_PNB_RMS", "APD_OVER_PNB_M3",
  "APD_OVER_PN_MEAN", "APD_OVER_PN_RMS", "APD_OVER_PN_M3",
  "SHAPE_COR", "ALPHA", "BETA",
  "TIME_MEAN", "TIME_RMS", "TIME_M3", "TIME_NEVT" 
}

Definition at line 110 of file ME.h.

TString ME::color [static]
Initial value:
 { 
  "Blue", "Green", "Red", "IRed", "LED1", "LED2" 
}

Definition at line 145 of file ME.h.

TString ME::granularity [static]
Initial value:
 { 
  "R", "SM", "LMR", "LMM", "SC", "C" 
}

Definition at line 60 of file ME.h.

const ME::TimeStamp ME::kLowMask = 0xFFFFFFFF [static]

Definition at line 76 of file ME.h.

TString ME::MTQPrimVar [static]
Initial value:
 {
  "FIT_METHOD", 
  "MTQ_AMPL", "MTQ_TIME", "MTQ_RISE", 
  "MTQ_FWHM", "MTQ_FW20", "MTQ_FW80", "MTQ_SLIDING"
}

Definition at line 123 of file ME.h.

TString ME::PNPrimVar [static]
Initial value:
 {
  "FLAG", "MEAN", "RMS", "M3", 
  "PNA_OVER_PNB_MEAN", "PNA_OVER_PNB_RMS", "PNA_OVER_PNB_M3",
}

Definition at line 116 of file ME.h.

TString ME::region [static]
Initial value:
 { 
  "EE-", "EB-", "EB+", "EE+" 
}

Definition at line 57 of file ME.h.

Referenced by MEChannel::oneLine(), and MEChannel::oneWord().

TString ME::TPAPDPrimVar [static]
Initial value:
 {
  "FLAG", "MEAN", "RMS", "M3", "NEVT"
}

Definition at line 128 of file ME.h.

TString ME::TPPNPrimVar [static]
Initial value:
 {
  "GAIN", "MEAN", "RMS", "M3"
}

Definition at line 133 of file ME.h.

TString ME::type [static]
Initial value:
 { 
  "Laser", "TestPulse"
}

Definition at line 144 of file ME.h.

bool ME::useElectronicNumbering = false [static]

Definition at line 40 of file ME.h.