#include "CalDetDST/LoadCalDetFilterChannels.h"#include "CalDetDST/ChannelsToFilter.h"#include <iostream>#include "Validity/VldContext.h"#include "Validity/VldRange.h"#include "Plex/PlexHandle.h"#include "Plex/PlexStripEndId.h"#include "DatabaseInterface/DbiCascader.h"#include "DatabaseInterface/DbiTableProxyRegistry.h"#include "DatabaseInterface/DbiWriter.h"#include "DatabaseInterface/DbiResultPtr.h"#include "DatabaseInterface/DbiValidityRec.h"#include "Conventions/StripEnd.h"Go to the source code of this file.
Functions | |
| void | MakeFilterChannelList (const VldTimeStamp &vts, const VldTimeStamp &vte, const vector< RawChannelId > &v, bool createtemp, Detector::Detector_t det, int sim) |
| void | FilterChannelsT1102 (bool createtemp) |
| void | FilterChannelsT702 (bool createtemp) |
| void | DumpFilterChannels (const VldContext &vc) |
|
|
Definition at line 138 of file LoadCalDetFilterChannels.cxx. References DbiResultPtr< T >::GetNumRows(), ChannelsToFilter::GetRawChannelId(), DbiResultPtr< T >::GetRow(), and PlexHandle::GetSEIdAltL(). 00138 {
00139 PlexHandle ph(vc);
00140 DbiResultPtr<ChannelsToFilter> rptr(vc);
00141 std::cout<<"List of Channels: "<<std::endl;
00142 for(unsigned int i=0; i<rptr.GetNumRows(); i++){
00143 const ChannelsToFilter* ctof = rptr.GetRow(i);
00144 std::cout<<(*ctof)<<std::endl;
00145 std::cout<<ph.GetSEIdAltL(ctof->GetRawChannelId())<<std::endl;
00146 }
00147
00148 }
|
|
|
Definition at line 59 of file LoadCalDetFilterChannels.cxx. References det, PlexHandle::GetRawChannelId(), and MakeFilterChannelList(). 00059 {
00060
00061 // construct, by hand, the list of bad strip ends
00062 // use a plexhandle to convert to rawchannelid
00063 // fill a vector with the rcids and call makefilterchannellist
00064
00065 const Detector::Detector_t det = Detector::kCalDet;
00066 // const int sim = (SimFlag::kData|SimFlag::kMC);
00067 const VldTimeStamp start(2002, 9, 16, 0, 0, 0);
00068 const VldTimeStamp end(2002, 10, 4, 0, 0, 0);
00069
00070
00071 const VldTimeStamp midrun(2002, 9, 24, 0,0,0);
00072 const VldContext vc(Detector::kCalDet,SimFlag::kData, midrun);
00073 PlexHandle ph(vc);
00074
00075 vector<RawChannelId> v;
00076
00077 // a complete loss
00078 v.push_back(
00079 ph.GetRawChannelId(PlexStripEndId(det,38,10,StripEnd::kPositive)) );
00080
00081 // the pedestal problem
00082 v.push_back(
00083 ph.GetRawChannelId(PlexStripEndId(det,20,4,StripEnd::kPositive)) );
00084
00085 v.push_back(
00086 ph.GetRawChannelId(PlexStripEndId(det,40,4,StripEnd::kPositive)) );
00087
00088 v.push_back(
00089 ph.GetRawChannelId(PlexStripEndId(det,21,19,StripEnd::kNegative)) );
00090
00091 v.push_back(
00092 ph.GetRawChannelId(PlexStripEndId(det,41,19,StripEnd::kNegative)) );
00093
00094 MakeFilterChannelList(start,end,v,createtemp);
00095
00096
00097 }
|
|
|
Definition at line 99 of file LoadCalDetFilterChannels.cxx. References det, PlexHandle::GetRawChannelId(), and MakeFilterChannelList(). 00099 {
00100
00101 // construct, by hand, the list of bad strip ends
00102 // use a plexhandle to convert to rawchannelid
00103 // fill a vector with the rcids and call makefilterchannellist
00104
00105 const Detector::Detector_t det = Detector::kCalDet;
00106 // const int sim = (SimFlag::kData|SimFlag::kMC);
00107 const VldTimeStamp start(2002, 10, 4, 0, 0, 1);
00108 const VldTimeStamp end(2002, 10, 17, 0, 0, 1);
00109
00110
00111 const VldTimeStamp midrun(2002, 10, 10, 0,0,0);
00112 const VldContext vc(Detector::kCalDet,SimFlag::kData, midrun);
00113 PlexHandle ph(vc);
00114
00115 vector<RawChannelId> v;
00116
00117 // a complete loss
00118 v.push_back(
00119 ph.GetRawChannelId(PlexStripEndId(det,38,10,StripEnd::kPositive)) );
00120
00121 // the pedestal problem
00122 v.push_back(
00123 ph.GetRawChannelId(PlexStripEndId(det,20,4,StripEnd::kPositive)) );
00124
00125 v.push_back(
00126 ph.GetRawChannelId(PlexStripEndId(det,40,4,StripEnd::kPositive)) );
00127
00128 v.push_back(
00129 ph.GetRawChannelId(PlexStripEndId(det,21,19,StripEnd::kNegative)) );
00130
00131 v.push_back(
00132 ph.GetRawChannelId(PlexStripEndId(det,41,19,StripEnd::kNegative)) );
00133
00134 MakeFilterChannelList(start,end,v,createtemp);
00135
00136 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 17 of file LoadCalDetFilterChannels.cxx. References DbiWriter< T >::Close(), DbiCascader::CreateTemporaryTable(), det, DbiTableProxyRegistry::GetCascader(), and DbiTableProxyRegistry::Instance(). 00022 {
00023 if(createtemp){
00024 // Ask the singleton DbiTableProxyRegistry for the DbiCascader.
00025 DbiCascader& cascader
00026 = DbiTableProxyRegistry::Instance().GetCascader();
00027
00028 // Define the table.
00029 string tableDescr = "(SeqNo int, Encoded BIGINT UNSIGNED)";
00030
00031 // Ask the cascader to find a database that will accept it.
00032 Int_t dbNoTemp = cascader.CreateTemporaryTable("CHANNELSTOFILTER",
00033 tableDescr);
00034
00035 if ( dbNoTemp < 0 ) {
00036 std::cout << "No database to will accept temporary tables."
00037 << std::endl;
00038 return;
00039 }
00040 }
00041
00042 VldRange vr(det,sim,vts,vte,"MakeFilterChannelList");
00043 VldTimeStamp now;
00044 Dbi::Task task=0;
00045 int aggno=-1;
00046 DbiWriter<ChannelsToFilter> writer(vr,aggno,task,now);
00047 for(unsigned int i=0; i<v.size(); i++){
00048 ChannelsToFilter chan(v[i]);
00049 writer<<chan;
00050 }
00051 if(!writer.Close()){
00052 std::cout<<"\nMakeFilterChannelList(): "
00053 <<"Output error writing data!"<<std::endl;
00054 }
00055
00056 }
|
1.3.9.1