Skip to content
Snippets Groups Projects
Commit d6b21bb3 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Merged in upstream

parent ffeae862
Branches v1.3-dev
Tags v1.3.0
No related merge requests found
Pipeline #3761 failed
cmake_minimum_required(VERSION 3.5)
project(hcana VERSION 1.2.0 LANGUAGES CXX)
project(hcana VERSION 1.3.0 LANGUAGES CXX)
option(HCANA_BUILTIN_PODD "Use built-in Podd submodule (default: YES)" OFF)
......
......@@ -24,7 +24,7 @@ RUN ls -lrth /usr/local/lib/lib*.so \
&& export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \
&& export PATH=/usr/local/bin:$PATH \
&& git clone https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/analyzer.git \
&& mkdir analyzer/build && cd analyzer/build && git pull \
&& mkdir analyzer/build && cd analyzer/build && git pull && git checkout v1.3-dev\
&& cmake ../. && make -j20 VERBOSE=1 && make install \
&& cd /tmp && rm -rf analyzer \
&& git clone https://eicweb.phy.anl.gov/jlab/hcana.git \
......
This diff is collapsed.
......@@ -8,94 +8,91 @@
//
/////////////////////////////////////////////////////////////////////
#include "THaRunBase.h"
#include "THaEvtTypeHandler.h"
#include "Decoder.h"
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include "TTree.h"
#include "THaEvtTypeHandler.h"
#include "THaRunBase.h"
#include "TString.h"
#include <cstring>
#include "TTree.h"
#include "hcana/Logger.h"
#include <algorithm>
#include <cstring>
#include <set>
#include <string>
#include <vector>
class THcHelicity;
class THcHelicityScaler : public hcana::ConfigLogging<THaEvtTypeHandler> {
public:
THcHelicityScaler(const char*, const char*);
virtual ~THcHelicityScaler();
Int_t Analyze(THaEvData *evdata);
Int_t AnalyzeBuffer(UInt_t *rdata);
Int_t AnalyzeHelicityScaler(UInt_t *p);
virtual EStatus Init( const TDatime& run_time);
virtual Int_t ReadDatabase(const TDatime& date );
virtual Int_t End( THaRunBase* r=0 );
Int_t Analyze(THaEvData* evdata);
Int_t AnalyzeBuffer(UInt_t* rdata);
Int_t AnalyzeHelicityScaler(UInt_t* p);
virtual EStatus Init(const TDatime& run_time);
virtual Int_t ReadDatabase(const TDatime& date);
virtual Int_t End(THaRunBase* r = 0);
virtual void SetUseFirstEvent(Bool_t b = kFALSE) {fUseFirstEvent = b;}
virtual void SetUseFirstEvent(Bool_t b = kFALSE) { fUseFirstEvent = b; }
virtual void SetDelayedType(int evtype);
virtual void SetROC(Int_t roc) {fROC=roc;}
virtual void SetBankID(Int_t bankid) {fBankID=bankid;}
virtual void SetNScalerChannels(Int_t n) {fNScalerChannels = n;}
virtual Int_t GetNevents() { return fNTrigsInBuf;}
virtual Int_t GetNcycles() { return fNTriggers;}
virtual Int_t GetEvNum() { return evNumber;}
virtual Int_t* GetHelicityHistoryP() {return fHelicityHistory;}
virtual Int_t GetReportedSeed() {return fRingSeed_reported;}
virtual Int_t GetReportedActual() {return fRingSeed_actual;}
virtual Bool_t IsSeedGood() {return fNBits>=30;}
Double_t GetPlusCharge(const std::string &name);
Double_t GetMinusCharge(const std::string &name);
virtual void SetROC(Int_t roc) { fROC = roc; }
virtual void SetBankID(Int_t bankid) { fBankID = bankid; }
virtual void SetNScalerChannels(Int_t n) { fNScalerChannels = n; }
virtual Int_t GetNevents() { return fNTrigsInBuf; }
virtual Int_t GetNcycles() { return fNTriggers; }
virtual Int_t GetEvNum() { return evNumber; }
virtual Int_t* GetHelicityHistoryP() { return fHelicityHistory; }
virtual Int_t GetReportedSeed() { return fRingSeed_reported; }
virtual Int_t GetReportedActual() { return fRingSeed_actual; }
virtual Bool_t IsSeedGood() { return fNBits >= 30; }
Double_t GetPlusCharge(const std::string& name);
Double_t GetMinusCharge(const std::string& name);
private:
Int_t RanBit30(Int_t ranseed);
void MakeParms();
UInt_t fBankID;
// Helicity Scaler variables
Int_t fNTrigsInBuf; /* # of helicity scaler reads in last event */
Int_t fNTrigsInBuf; /* # of helicity scaler reads in last event */
Int_t fNTriggers;
Int_t fFirstCycle;
Int_t fHelicityHistory[200];
//
Bool_t fUseFirstEvent;
Int_t fDelayedType;
Int_t fDelayedType;
Int_t fRingSeed_reported;
Int_t fRingSeed_actual;
Int_t fNBits;
Int_t fNTriggersPlus;
Int_t fNTriggersMinus;
Int_t fNTriggersPlus;
Int_t fNTriggersMinus;
std::vector<Double_t> fHScalers[2];
Int_t fGateCount[2];
Int_t fGateCount[2];
std::vector<Double_t> fScalerSums, fAsymmetry, fAsymmetryError;
std::vector<Double_t> fCharge, fChargeAsymmetry;
Double_t fTime;
Double_t fTimeAsymmetry;
Double_t fTriggerAsymmetry;
Double_t fTime;
Double_t fTimeAsymmetry;
Double_t fTriggerAsymmetry;
std::vector<UInt_t*> fDelayedEvents;
Int_t fROC;
Int_t fNScalerChannels; // Number of scaler channels/event
Int_t fROC;
Int_t fNScalerChannels; // Number of scaler channels/event
Int_t fNumBCMs;
std::vector<Double_t> fBCM_Gain, fBCM_Offset;
std::vector <std::string> fBCM_Name;
Int_t fNumBCMs;
std::vector<Double_t> fBCM_Gain, fBCM_Offset;
std::vector<std::string> fBCM_Name;
THcHelicityScaler(const THcHelicityScaler& fh);
THcHelicityScaler& operator=(const THcHelicityScaler& fh);
UInt_t evNumber;
ClassDef(THcHelicityScaler,0) // Scaler Event handler
ClassDef(THcHelicityScaler, 0) // Scaler Event handler
};
#endif
......@@ -32,6 +32,13 @@ To enable debugging you may try this in the setup script
~~~
\author E. Brash based on THaScalerEvtHandler by R. Michaels
*/
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <map>
#include <sstream>
#include "THcScalerEvtHandler.h"
#include "GenScaler.h"
......@@ -54,13 +61,6 @@ To enable debugging you may try this in the setup script
#include "TROOT.h"
#include "TString.h"
#include "VarDef.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <map>
#include <sstream>
using namespace std;
using namespace Decoder;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment