CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
CastorDataFrameFilter_impl Namespace Reference

Functions

template<class DataFrame >
bool check (const DataFrame &df, bool capcheck, bool dvercheck)
 
template<class DataFrame >
double energySum (const DataFrame &df, int fs, int ls)
 

Function Documentation

template<class DataFrame >
bool CastorDataFrameFilter_impl::check ( const DataFrame &  df,
bool  capcheck,
bool  dvercheck 
)

Definition at line 6 of file CastorDataFrameFilter.cc.

References i.

Referenced by CastorDataFrameFilter::filter().

6  {
7  if (capcheck || dvercheck) {
8  int lastcapid=0, capid=0;
9  for (int i=0; i<df.size(); i++) {
10  capid=df[i].capid();
11  if (capcheck && i!=0 && ((lastcapid+1)%4)!=capid)
12  return false;
13  if (dvercheck && ( df[i].er() || !df[i].dv() ))
14  return false;
15  lastcapid=capid;
16  }
17  }
18  return true;
19  }
int i
Definition: DBlmapReader.cc:9
template<class DataFrame >
double CastorDataFrameFilter_impl::energySum ( const DataFrame &  df,
int  fs,
int  ls 
)