-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add back duplicated file removal in #35105
- Loading branch information
yuanchao
committed
Sep 13, 2021
1 parent
bee8337
commit bec9a31
Showing
14 changed files
with
947 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#ifndef DTRawToDigi_DTROS25Data_h | ||
#define DTRawToDigi_DTROS25Data_h | ||
|
||
/** \class DTROS25Data | ||
* The collection containing DT ROS25 status data. | ||
* | ||
* \author M. Zanetti - INFN Padova | ||
*/ | ||
|
||
#include <DataFormats/DTDigi/interface/DTDDUWords.h> | ||
|
||
#include <vector> | ||
|
||
|
||
typedef std::pair<int, DTTDCMeasurementWord> DTTDCData; | ||
|
||
class DTROS25Data { | ||
|
||
public: | ||
|
||
/// Constructors | ||
DTROS25Data(int ROSId = 0): theROSId(ROSId) {} | ||
|
||
|
||
/// Destructor | ||
virtual ~DTROS25Data() {} | ||
|
||
/// Setters | ||
inline void setROSId(const int & ID) { theROSId = ID; } | ||
|
||
inline void addROSTrailer( const DTROSTrailerWord & word) { theROSTrailers.push_back(word); } | ||
inline void addROSError( const DTROSErrorWord & word) { theROSErrors.push_back(word); } | ||
inline void addROSDebug( const DTROSDebugWord & word) { theROSDebugs.push_back(word); } | ||
inline void addROBTrailer( const DTROBTrailerWord & word) { theROBTrailers.push_back(word); } | ||
inline void addTDCMeasurement( const DTTDCMeasurementWord & word) { theTDCMeasurements.push_back(word); } | ||
inline void addTDCData( const DTTDCData & tdcData) { theTDCData.push_back(tdcData); } | ||
|
||
/// Getters | ||
inline int getROSID() const { return theROSId; } | ||
|
||
inline const std::vector<DTROSTrailerWord>& getROSTrailers() const {return theROSTrailers;} | ||
inline const std::vector<DTROSErrorWord>& getROSErrors() const {return theROSErrors;} | ||
inline const std::vector<DTROSDebugWord>& getROSDebugs() const {return theROSDebugs;} | ||
inline const std::vector<DTROBTrailerWord>& getROBTrailers() const {return theROBTrailers;} | ||
inline const std::vector<DTTDCMeasurementWord>& getTDCMeasurements() const {return theTDCMeasurements;} | ||
inline const std::vector<DTTDCData>& getTDCData() const {return theTDCData;} | ||
|
||
private: | ||
|
||
int theROSId; | ||
|
||
std::vector<DTROSTrailerWord> theROSTrailers; | ||
std::vector<DTROSErrorWord> theROSErrors; | ||
std::vector<DTROSDebugWord> theROSDebugs; | ||
std::vector<DTROBTrailerWord> theROBTrailers; | ||
std::vector<DTTDCMeasurementWord> theTDCMeasurements; | ||
std::vector<DTTDCData> theTDCData; | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#ifndef ESCrcKchipFast_H | ||
#define ESCrcKchipFast_H | ||
|
||
#include <cstdint> | ||
|
||
class ESCrcKchipFast { | ||
|
||
private : | ||
|
||
uint32_t crc; | ||
|
||
public: | ||
|
||
ESCrcKchipFast() { | ||
init(); | ||
reset() ; | ||
}; | ||
|
||
void init() { | ||
crc = 0x0ffff ; | ||
} | ||
|
||
void reset() { | ||
crc = 0x0ffff ; | ||
} ; | ||
|
||
void add(unsigned int data) { | ||
for (int i=0;i<16;i++) | ||
{ | ||
if ((crc&0x0001) == (data&0x0001)) | ||
crc=crc>>1; | ||
else | ||
crc=(crc>>1)^0x8408; // flipped 0x1021; | ||
data=(data>>1); | ||
} | ||
}; | ||
|
||
uint32_t get_crc() { | ||
return crc ; | ||
}; | ||
|
||
bool isCrcOk(unsigned int crcin=0x0000) { | ||
return ((get_crc()==crcin) ? true : false ); | ||
}; | ||
|
||
~ESCrcKchipFast() { } ; | ||
|
||
}; | ||
|
||
#endif |
32 changes: 32 additions & 0 deletions
32
EventFilter/EcalRawToDigi/interface/ECALUnpackerException.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Date : 30/05/2005 | ||
// Author : N.Almeida (LIP) | ||
|
||
#ifndef ECALUNPACKEREXCEPTION_H | ||
#define ECALUNPACKEREXCEPTION_H | ||
|
||
#include <iostream> | ||
#include <string> | ||
#include <sstream> | ||
|
||
|
||
class ECALUnpackerException { | ||
public : | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
ECALUnpackerException(std::ostringstream a){ info_=a.str(); } | ||
|
||
ECALUnpackerException(std::string a){info_=a;} | ||
/** | ||
* Exception's discription | ||
*/ | ||
std::string what() const throw() { return info_;} | ||
|
||
protected : | ||
|
||
std::string info_; | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef MyWATCHER_H | ||
#define MyWATCHER_H | ||
|
||
#include "TStopwatch.h" | ||
#include <iostream> | ||
#include <sstream> | ||
|
||
#ifdef EDM_ML_DEBUG | ||
class MyWatcher : public TStopwatch { | ||
public: | ||
MyWatcher(const std::string n=""):name(n),total(0) {} | ||
~MyWatcher(){} | ||
|
||
std::string start(bool r=true){Start(r); return " [Start]";} | ||
std::string continu(){Continue(); return " [Continue]";} | ||
std::string reset(){Reset(); return " [Reset]";} | ||
std::string stop() {Stop(); return " [Stop]";} | ||
std::string lap() { | ||
std::stringstream o; | ||
double r=RealTime(); | ||
total+=r; | ||
o<<"\n "<<r<<" total:"<<total<<" ["<<name<<"]"; | ||
Start(); | ||
return o.str();} | ||
std::string name; | ||
double total; | ||
}; | ||
#else | ||
class MyWatcher { | ||
public: | ||
MyWatcher(const std::string) {} | ||
~MyWatcher(){} | ||
|
||
std::string start(bool r=true){return name;} | ||
std::string continu(){return name;} | ||
std::string reset(){return name;} | ||
std::string stop(){return name;} | ||
std::string lap() {return name;} | ||
std::string name; | ||
}; | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "DataFormats/RPCDigi/interface/RPCRawSynchro.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#ifndef EVF_MODULEWEB_H | ||
#define EVF_MODULEWEB_H | ||
|
||
//#include "toolbox/lang/Class.h" | ||
//#include "xdata/InfoSpace.h" | ||
#include <string> | ||
#include <pthread.h> | ||
#include <semaphore.h> | ||
|
||
|
||
|
||
namespace evf | ||
{ | ||
|
||
|
||
namespace moduleweb { | ||
class ForkParams { | ||
public: | ||
ForkParams():slotId(-1),restart(0),isMaster(-1){} | ||
int slotId; | ||
bool restart; | ||
int isMaster; | ||
}; | ||
class ForkInfoObj { | ||
public: | ||
ForkInfoObj() | ||
{ | ||
control_sem_ = new sem_t; | ||
sem_init(control_sem_,0,0); | ||
stopCondition=0; | ||
receivedStop_=false; | ||
} | ||
~ForkInfoObj() | ||
{ | ||
sem_destroy(control_sem_); | ||
delete control_sem_; | ||
} | ||
void lock() {if (mst_lock_) pthread_mutex_lock(mst_lock_);} | ||
void unlock() {if (mst_lock_) pthread_mutex_unlock(mst_lock_);} | ||
void (*forkHandler) (void *); | ||
ForkParams forkParams; | ||
unsigned int stopCondition; | ||
bool receivedStop_; | ||
sem_t *control_sem_; | ||
pthread_mutex_t * mst_lock_; | ||
void * fuAddr; | ||
}; | ||
} | ||
|
||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#ifndef JSON_CONFIG_H_INCLUDED | ||
# define JSON_CONFIG_H_INCLUDED | ||
|
||
/// If defined, indicates that json library is embedded in CppTL library. | ||
//# define JSON_IN_CPPTL 1 | ||
|
||
/// If defined, indicates that json may leverage CppTL library | ||
//# define JSON_USE_CPPTL 1 | ||
/// If defined, indicates that cpptl vector based map should be used instead of std::map | ||
/// as Value container. | ||
//# define JSON_USE_CPPTL_SMALLMAP 1 | ||
/// If defined, indicates that Json specific container should be used | ||
/// (hash table & simple deque container with customizable allocator). | ||
/// THIS FEATURE IS STILL EXPERIMENTAL! | ||
//# define JSON_VALUE_USE_INTERNAL_MAP 1 | ||
/// Force usage of standard new/malloc based allocator instead of memory pool based allocator. | ||
/// The memory pools allocator used optimization (initializing Value and ValueInternalLink | ||
/// as if it was a POD) that may cause some validation tool to report errors. | ||
/// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined. | ||
//# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1 | ||
|
||
/// If defined, indicates that Json use exception to report invalid type manipulation | ||
/// instead of C assert macro. | ||
# define JSON_USE_EXCEPTION 1 | ||
|
||
# ifdef JSON_IN_CPPTL | ||
# include <cpptl/config.h> | ||
# ifndef JSON_USE_CPPTL | ||
# define JSON_USE_CPPTL 1 | ||
# endif | ||
# endif | ||
|
||
# ifdef JSON_IN_CPPTL | ||
# define JSON_API CPPTL_API | ||
# elif defined(JSON_DLL_BUILD) | ||
# define JSON_API __declspec(dllexport) | ||
# elif defined(JSON_DLL) | ||
# define JSON_API __declspec(dllimport) | ||
# else | ||
# define JSON_API | ||
# endif | ||
|
||
#endif // JSON_CONFIG_H_INCLUDED |
54 changes: 54 additions & 0 deletions
54
HeavyFlavorAnalysis/SpecificDecay/interface/BPHMuonChargeSelect.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#ifndef HeavyFlavorAnalysis_SpecificDecay_BPHMuonChargeSelect_h | ||
#define HeavyFlavorAnalysis_SpecificDecay_BPHMuonChargeSelect_h | ||
/** \class BPHMuonChargeSelect | ||
* | ||
* Description: | ||
* Class for muon selection by charge | ||
* | ||
* \author Paolo Ronchese INFN Padova | ||
* | ||
*/ | ||
|
||
//---------------------- | ||
// Base Class Headers -- | ||
//---------------------- | ||
#include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleChargeSelect.h" | ||
|
||
//------------------------------------ | ||
// Collaborating Class Declarations -- | ||
//------------------------------------ | ||
#include "DataFormats/PatCandidates/interface/Muon.h" | ||
|
||
//--------------- | ||
// C++ Headers -- | ||
//--------------- | ||
|
||
// --------------------- | ||
// -- Class Interface -- | ||
// --------------------- | ||
|
||
class BPHMuonChargeSelect : public BPHParticleChargeSelect { | ||
public: | ||
/** Constructor | ||
*/ | ||
BPHMuonChargeSelect(int c) : BPHParticleChargeSelect(c) {} | ||
|
||
// deleted copy constructor and assignment operator | ||
BPHMuonChargeSelect(const BPHMuonChargeSelect& x) = delete; | ||
BPHMuonChargeSelect& operator=(const BPHMuonChargeSelect& x) = delete; | ||
|
||
/** Destructor | ||
*/ | ||
~BPHMuonChargeSelect() override {} | ||
|
||
/** Operations | ||
*/ | ||
/// select muon | ||
bool accept(const reco::Candidate& cand) const override { | ||
if (dynamic_cast<const pat::Muon*>(&cand) == nullptr) | ||
return false; | ||
return BPHParticleChargeSelect::accept(cand); | ||
}; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.