blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
2
247
content_id
stringlengths
40
40
detected_licenses
listlengths
0
57
license_type
stringclasses
2 values
repo_name
stringlengths
4
111
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
58
visit_date
timestamp[ns]date
2015-07-25 18:16:41
2023-09-06 10:45:08
revision_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
committer_date
timestamp[ns]date
1970-01-14 14:03:36
2023-09-06 06:22:19
github_id
int64
3.89k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
25 values
gha_event_created_at
timestamp[ns]date
2012-06-07 00:51:45
2023-09-14 21:58:52
gha_created_at
timestamp[ns]date
2008-03-27 23:40:48
2023-08-24 19:49:39
gha_language
stringclasses
159 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
10.5M
extension
stringclasses
111 values
filename
stringlengths
1
195
text
stringlengths
7
10.5M
36e159eb08c20173146149d17975370273eb336b
c8a8b1b2739ff50c3565cdc1497e6abf4492b3dd
/src/csapex_remote/include/csapex/serialization/feedback_serializer.h
84f7dcf03f1820678edb5325b1d6861b4de14c30
[]
permissive
betwo/csapex
645eadced88e65d6e78aae4049a2cda5f0d54b4b
dd8e24f14cdeef59bedb8f974ebdc0b0c656ab4c
refs/heads/master
2022-06-13T06:15:10.306698
2022-06-01T08:50:51
2022-06-01T09:03:05
73,413,991
0
0
BSD-3-Clause
2020-01-02T14:01:01
2016-11-10T19:26:29
C++
UTF-8
C++
false
false
529
h
feedback_serializer.h
#ifndef FEEDBACK_SERIALIZER_H #define FEEDBACK_SERIALIZER_H /// PROJECT #include <csapex/serialization/packet_serializer.h> #include <csapex/io/broadcast_message.h> /// SYSTEM #include <inttypes.h> namespace csapex { class FeedbackSerializer : public Singleton<FeedbackSerializer>, public Serializer { public: void serialize(const Streamable& packet, SerializationBuffer& data) override; StreamablePtr deserialize(const SerializationBuffer& data) override; }; } // namespace csapex #endif // FEEDBACK_SERIALIZER_H
288f00d13d4a7979da89476a924026f6592eeb0e
b10a4a6cce39804c510696f81a334e60530b1046
/SUDOGNRT.CPP
ad13009448836c6754b5df60d91393ff91aeea11
[]
no_license
rahulkashyap1506/sudoku-generator
c1dad4f5be84b78bc6c7d540a03ea896bd83cdc7
e84a2a557e428cc8edecda7d9be36eae3780aac5
refs/heads/master
2020-03-26T09:30:13.954537
2018-08-14T18:27:51
2018-08-14T18:27:51
144,751,675
0
0
null
null
null
null
UTF-8
C++
false
false
4,076
cpp
SUDOGNRT.CPP
#include<iostream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> int z[9][3][3],z1[9][3][3],a[9],b[9][9],b1[9][9],p[4]; int h,i,j,k,temp,check,m,n,x,y; void sudo_gnrt(); void print(); void segment(); void method(); void puzzle(); void solver(); void exit(); void main() {clrscr(); randomize(); method(); puzzle(); solver(); } /********** CHECKER **********/ void sudo_gnrt() {for(i=0;i<3;i++) for(j=0;j<3;j++) {x=i; y=j; do{if(kbhit()) break; check=0; for(h=0;h<m;h++) for(k=0;k<3;k++) {temp=abs(n-p[h]); if(temp%3==0) {if(z[p[h]][k][j]==z[n][x][y]) {check=1; break;}} else {if(z[p[h]][i][k]==z[n][x][y]) {check=1; break;}}} if(check==0) {temp=z[n][x][y]; z[n][x][y]=z[n][i][j]; z[n][i][j]=temp;} if(check==1) {y++; if(y==3) {x++; y=0;}} if(x==3) {x=0; y=0; method();}}while(check==1);}} /********** RANDOM VALUE CREATOR **********/ void segment() {for(j=0;j<9;j++) {do{temp=random(9)+1; check=0; for(k=0;k<j;k++) if(a[k]==temp) check=1;}while(check==1); a[j]=temp;} temp=0; for(j=0;j<3;j++) for(k=0;k<3;k++) z[n][j][k]=a[temp++];} /********** STRUCTURE **********/ void method() {for(n=0;n<9;n++) segment(); p[0]=0; m=1; n=1; sudo_gnrt(); p[0]=0; m=1; n=3; sudo_gnrt(); p[0]=0; p[1]=1; m=2; n=2; sudo_gnrt(); p[0]=0; p[1]=3; m=2; n=6; sudo_gnrt(); p[0]=1; p[1]=3; m=2; n=4; sudo_gnrt(); p[0]=2; p[1]=3; p[2]=4; m=3; n=5; sudo_gnrt(); p[0]=1; p[1]=4; p[2]=6; m=3; n=7; sudo_gnrt(); p[0]=2; p[1]=5; p[2]=6; p[3]=7; m=4; n=8; sudo_gnrt();} /********** PRINTER **********/ void print() {//2D TO 3D x=0; y=0; for(i=0;i<9;i++) {if(i>0) {x+=3; if(i%3==0) {y+=3; x=0;}} m=x; n=y; for(j=0;j<3;j++) {for(k=0;k<3;k++) b[n][m++]=z[i][j][k]; n++; m=x;}} //PRINTER cout<<"\t\t\t\t "; textcolor(LIGHTGREEN); cputs("SUDOKU"); cout<<"\n\n"; for(i=0;i<9;i++) {cout<<"\t\t\t "; if(i>0&&i%3==0) cout<<endl<<"\t\t\t "; for(j=0;j<9;j++) {if(j>0&&j%3==0) cout<<" "; if(b1[i][j]==0) {textcolor(LIGHTRED); cprintf("%d",b[i][j]);} else if(b1[i][j]==1) {textcolor(WHITE); cputs("_");} else if(b1[i][j]==2) {textcolor(LIGHTCYAN); cprintf("%d",b[i][j]);} cout<<" ";} cout<<endl;}} /********** PUZZLE MAKER **********/ void puzzle() {//PUZZLE for(n=0;n<5;n++) for(i=0;i<3;i++) for(j=0;j<3;j++) {temp=random(3); if(temp==0) {z1[n][i][j]=0; z1[8-n][abs(2-i)][abs(2-j)]=0;} else {z1[n][i][j]=1; z1[8-n][abs(2-i)][abs(2-j)]=1;}} //2D TO 3D x=0; y=0; for(i=0;i<9;i++) {if(i>0) {x+=3; if(i%3==0) {y+=3; x=0;}} m=x; n=y; for(j=0;j<3;j++) {for(k=0;k<3;k++) b1[n][m++]=z1[i][j][k]; n++; m=x;}}} /********** SOLVER **********/ void solver() {do{check=0; textcolor(WHITE); clrscr(); print(); cout<<"\nPress 0 To Solve And Exit"; cout<<"\nEnter Row - "; cin>>x; if(x==0) {exit(); continue;} cout<<"Enter Column - "; cin>>y; if(y==0) {exit(); continue;} cout<<"Enter Value - "; cin>>n; if(n==0) {exit(); continue;} x-=1; y-=1; if(b1[x][y]==1) {if(b[x][y]==n) b1[x][y]=2; else {cout<<"\nWrong Value"; getch();}} else {check=1; cout<<"\nINVALID MOVE"; getch();} for(i=0;i<9;i++) for(j=0;j<9;j++) if(b1[i][j]==1) check=1; if(check==0) {cout<<"\n\t\t\t\t"; textcolor(YELLOW); cputs("You Won"); getch();}}while(check==1);} /********** EXIT **********/ void exit() {clrscr(); for(i=0;i<9;i++) for(j=0;j<9;j++) if(b1[i][j]==1) b1[i][j]=2; print(); getch(); check=0;}
0ddbf3460796ac300dc3e8a0784d418731894248
9add04ed3a83cca3cc3f84b2a8f744dc12d893d7
/gaussiankernel.h
5be615352cce164443c0bc8a3e54f2ca863f6932
[]
no_license
stmd/SPH
0114d6d46293609653c22fb1344d1bc228cbf923
5cd54652fcadafc8fbb98997c16399116deaf80c
refs/heads/master
2016-09-15T21:32:35.748270
2013-01-18T21:43:44
2013-01-18T21:43:44
6,923,834
0
1
null
null
null
null
UTF-8
C++
false
false
609
h
gaussiankernel.h
/** * \file * * \brief implementation of a Gaussian Kernel */ #ifndef GAUSSIANKERNEL_H_ #define GAUSSIANKERNEL_H_ #include "kernel.h" /// Gaussian approximation of point particle class GaussianKernel : public Kernel { public: /// ctor GaussianKernel(double smoothinglength); /// dtor ~GaussianKernel(); /// returns value of Gaussian double W(double r); /// returns gradient of Gaussian Kvector gradW(Kvector vec1, Kvector vec2); /// returns value of the Laplacian of Gaussian double lapW(double r); private: double h_; }; #endif // GAUSSIANKERNEL_H_
ba6365d8f9986288c50f0741e17a177eacc62abb
031b134b5e59d6863c8807986de60c93d9d2b4bd
/Polygon.cpp
fc8bebafca3a0dd1fe36e6b20012806eb0098ffa
[ "MIT" ]
permissive
m1h4/Touch
9ab147dd8d71ee808b8b09b3689d4fe8c7062e3d
66ad2b9945cfaafcff619621bb9db6c13a3fffb1
refs/heads/master
2023-04-14T17:45:50.729913
2023-04-11T08:29:20
2023-04-11T08:29:20
43,632,853
1
0
null
null
null
null
UTF-8
C++
false
false
41
cpp
Polygon.cpp
#include "Globals.h" #include "Polygon.h"
3b86161f730c2772beb412d7f1f6738070e350ec
1f542e79a6a84c7119f08ad812e48e0978ee6dc1
/uva solution/1uva136.cpp
cd1a633c73093ce1166ec10cb1c4de9de1a8fd16
[]
no_license
murad034/All-Code-Semister
218dc4bc1cb6ece4b734664607bef7e80310498a
181b5d6e78bd724bfab0f72057b485e7538325e7
refs/heads/master
2022-04-03T01:06:36.983377
2020-02-04T10:55:33
2020-02-04T10:55:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
407
cpp
1uva136.cpp
#include<bits/stdc++.h> using namespace std; int main() { set<long long int >v; set<long long int > ::iterator it; v.insert(1); for(int i=1; i<1500; i++) { it=v.begin(); v.insert(*it*2); v.insert(*it*3); v.insert(*it*5); v.erase(*it); } it=v.begin(); cout<<"The 1500'th ugly number is "<<*it<<"."<<endl; return 0; }
895fb257515170080f0e1d9d2fe39916d6912d62
877fff5bb313ccd23d1d01bf23b1e1f2b13bb85a
/app/src/main/cpp/dir7941/dir29315/dir29712/dir30926/dir32086/dir32237/file32352.cpp
b3e49f5c005863a0a8d7ec671b13e2669c21e50f
[]
no_license
tgeng/HugeProject
829c3bdfb7cbaf57727c41263212d4a67e3eb93d
4488d3b765e8827636ce5e878baacdf388710ef2
refs/heads/master
2022-08-21T16:58:54.161627
2020-05-28T01:54:03
2020-05-28T01:54:03
267,468,475
0
0
null
null
null
null
UTF-8
C++
false
false
115
cpp
file32352.cpp
#ifndef file32352 #error "macro file32352 must be defined" #endif static const char* file32352String = "file32352";
d1299681c7787c299fc93df085fbb3029e293dad
14a42cecbd05a8662c97e79dd3228cb340df2d98
/Source/ARManager.hpp
90ecf1ec2f06830aa448c983eed4e242e8c00775
[]
no_license
GlenStraughn/Thesis-Research
5392a9c9e855989457ae4fa4fafdd59b39307f83
a10a160b8032a2d1e6202b79925b66e3fecb1408
refs/heads/master
2020-05-24T04:40:31.662904
2019-05-16T22:01:44
2019-05-16T22:01:44
187,098,046
0
0
null
null
null
null
UTF-8
C++
false
false
4,749
hpp
ARManager.hpp
//================================================================================// // ARManager // - Manager class for ARMarkers //--------------------------------------------------------------------------------// // AUTHOR: Glen Straughn // DATE: 01.16.2018 // COMPILER: Microsoft Visual C++ //--------------------------------------------------------------------------------// // NOTE: This class currently only supports glyph markers, because I have no reason // to incorporate NFT functionality. //================================================================================// #pragma once #include<AR/ar.h> #include<vector> #include<string> #include "ARMarker.hpp" #include "GlyphMarker.hpp" #include "ARCamera.hpp" #include "TypeDef.hpp" class ARManager { public: ARManager(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // DESCRIPTION: Initialize camera and load parameters. // MUTATES: // - mp_camera: Instantiates and initializes. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// bool initCamera(const std::string &cameraParameterFilePath); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // DESCRIPTION: Initialize NFTManager. // MUTATES: // - mp_cameraFrame: Instantiates. // - m_AR2Handle: Instantiates. // NOTES: Must be called after initCamera //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// bool initManager(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // DESCRIPTION: Load markers and configurations from file. // MUTATES: // - m_markers: Adds markers to list. // - m_kpmHandle: Initializes. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// bool loadMarkers(const std::string &markerFilePath); // Update subroutines //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // DESCRIPTION: Updates image that stores the camera frame. // MUTATES: // - mp_cameraFrame: gets new frame from camera //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// void updateCameraFrame(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // DESCRIPTION: Performs AR tracking on markers and updates them with results. // MUTATES: // - m_markers: If markers appear within frame. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// void updateMarkers(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // DESCRIPTION: Starts camera and marker reading. // MUTATES: // - m_running //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// bool start(); //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // DESCRIPTION: Stops camera and marker reading. // MUTATES: // - m_running //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// void stop(); // GETTERS AND SETTERS ARPose getMarkerPose(int markerNumber) const; ARPose getMarkerPose(const std::string &markerName) const; ARPose getOffsetMarkerPose(int markerNumber) const; ARPose getOffsetMarkerPose(const std::string &markerName) const; ARPose getMarkerOffset(int markerNumber) const; ARPose getMarkerOffset(const std::string &markerName) const; float getMarkerError(int markerNumber) const; inline void setErrorTolerance(float errorTol) { m_errorTolerance = errorTol; } inline bool isRunning() { return m_running; } inline Image* getCameraFramePtr() const { return mp_cameraFrame; } inline ARParamLT* getCameraParamLTPtr() { return mp_camera->getCameraParamLTPtr(); } int getMarkerPageNumber(std::string &markerName) const; inline AR_PIXEL_FORMAT getARPixelFormat() { return mp_camera->getPixelFormat(); } inline ARHandle* getARHandlePtr() { return mp_arHandle; } inline void setNumberOfPasses(unsigned int num) { m_numberOfPasses = num; } inline void setPassIncrement(int interval) { m_passIncrement = interval; } // Sets the amount to increase threshold between passes. void setBaseThreshold(unsigned int threshold); // Threshold is of range [0, 255] int getBaseThreshold() const { return m_baseThreshold; } void toggleVerbose() { m_verbose = !m_verbose; } protected: bool m_running; bool m_verbose; // Prints out marker detection when true; float m_errorTolerance; // Lower bound unsigned int m_numberOfPasses; // Number of times to scan mp_cameraFrame int m_passIncrement; // Amount to increment threshold per pass. int m_baseThreshold; std::vector<ARMarker*> m_markers; ARCamera* mp_camera; Image* mp_cameraFrame; ARHandle* mp_arHandle; AR3DHandle* mp_ar3dHandle; };
ceecf5e865bff1282b29d420abd93ea8058f368c
d1304b1448de7fcc42e062e180666eb06495ce22
/main.cpp
b3600068bc83ec1268a226b88a447f6d2e9b2992
[]
no_license
asoffer/Brainfuck-For-CPP
09f5c8fe666dfdcd194cf7a5af3346123ee4e7c0
3637c0a5cd89ff479da58beab595b5e777d1a72b
refs/heads/master
2021-03-12T22:28:15.788974
2015-09-01T04:51:41
2015-09-01T04:51:41
41,716,895
4
1
null
null
null
null
UTF-8
C++
false
false
443
cpp
main.cpp
#include "brainfuck.h" int main() { brainfuck:: bf ++++++++++[ bf >+++++++ bf >++++++++++ bf >+++ bf >+ bf << bf <<- bf ]>++ bf . bf >+ bf . bf +++++++ bf . bf ++--. bf +++ bf . bf >++ bf . bf <<+++++++++++++++ bf . bf > bf . bf +++ bf . bf ----+--- bf . bf ----+----- bf . bf > bf + bf . bf > bf . bf; }
575946ca5a0e7047ce68904da91b68dd040a3657
a5f187867ffe420f9292943ba5df1c77cab823e2
/LyahovskijMV/ЛяховскийМВ.b.tree.cpp
902ca870a1b65684bf8d95ac80a674649f90817d
[]
no_license
soomrack/MR2019
b47c7864773ecb48dbea3e31d824397c21c64c79
ce17d2defcc5bc445df76c689fb517ba7beb9e6a
refs/heads/master
2020-08-13T15:23:49.866104
2020-06-09T00:46:16
2020-06-09T00:46:16
214,990,498
14
3
null
2020-06-08T02:07:59
2019-10-14T08:35:32
C++
UTF-8
C++
false
false
23,255
cpp
ЛяховскийМВ.b.tree.cpp
#include <iostream> using namespace std; /* * t - max pointers in one node * t-1 - max amount of data in one node */ class Node { public: int *DataArray; Node **AddressArray; Node *ParentAddress; //current amount of numbers in node counter int DataCounter; //node leaf status flag bool leaf; //create new node Node(int data, int t) { //create data array this->DataArray = new int[t-1]; for (int i = 0; i < t - 1; i++) { this->DataArray[i] = NULL; //this->DataArray[i] = i; } //create address array this->AddressArray = new Node *[t]; for (int i = 0; i < t; i++) { this->AddressArray[i] = nullptr; } //write new data to node array this->DataArray[0] = data; this->DataCounter = 1; ParentAddress = nullptr; this->leaf = true; cout << "Node constructor" << endl; } private: }; class Tree { public: Node *root; Tree(int t) { root = nullptr; this->t = t; cout << "Tree constructor" << endl; } //add new data to the tree void AddData(int NewData); //find and write new data to appropriate place void FindAppropriatePlace(int NewData, Node *address); //mode elements in node data array forward from appropriate place void MoveElementsForward(Node *address, int AppropriatePlace); //mode elements in node data array backaward from appropriate place void MoveElementsBackward(Node* address, int AppropriatePlace); //split node into two parts, returns address of new created node with right half of splitted one Node *SplitNode(int NewData, Node *address); //find and delete goal data bool DeleteData(int DataToDelete, Node *address); void DeleteNode(Node *address); //insert new data to specific node void InsertData(int NewData, Node *address); //find data in specific node and retrn its place int FindDataInNode(int GoalData, Node *address); Node *FindData(int GoalData, Node* address); void PrintTree(Node *address); private: unsigned int t; }; void Tree::AddData(int NewData) { //if tree has no root -> create root node if (root == nullptr) { root = new Node(NewData, this->t); return; } //find and write to appropriate place FindAppropriatePlace(NewData, root); } void Tree::FindAppropriatePlace(int NewData, Node *address) { //all elements check for (int i = 0; i < (address->DataCounter); i++) { //if new data less than current element if (NewData < address->DataArray[i]) { //and if this node is a leaf if (address->leaf == true) { //and if this node has empty space if (address->DataCounter < (t - 1)) { //move existing elements forward to set free appropriate place for new data MoveElementsForward(address, i); //write new data address->DataArray[i] = NewData; address->DataCounter++; //exit return; } //if this node has no empty space else { //split node and write new data to appropriate place SplitNode(NewData, address); return; //find new place and write new data to it //return FindAppropriatePlace(NewData, root); } } //if this node is not a leaf else { //search deep return FindAppropriatePlace(NewData, address->AddressArray[i]); } } } //check is over, new data is more than all elements in node data array //hence we have to place new data to the right side of current node //check if it is a leaf if (address->leaf == true) { //if this node has empty space if (address->DataCounter < (t - 1)) { //write new data address->DataArray[address->DataCounter] = NewData; address->DataCounter++; } else { //split node SplitNode(NewData, address); //return FindAppropriatePlace(NewData, root); } } //if it is not a leaf else { //search deep inlast child return FindAppropriatePlace(NewData, address->AddressArray[address->DataCounter]); } } void Tree::MoveElementsForward(Node *address, int AppropriatePlace) { //index for moving left int index = address->DataCounter - 1; while (index >=0 && index != (AppropriatePlace - 1)) { //copy current element forward address->DataArray[index + 1] = address->DataArray[index]; address->AddressArray[index + 2] = address->AddressArray[index + 1]; index--; } //after this action i can write new data to appropriate place in leaf node } void Tree::MoveElementsBackward(Node *address, int AppropriatePlace) { //index for moving right int index = AppropriatePlace; if (index == 0) { while (index < (address->DataCounter)) { //copy current element backward address->DataArray[index] = address->DataArray[index + 1]; index++; } index = 0; while (index < (address->DataCounter + 1)) { //copy current element backward address->AddressArray[index] = address->AddressArray[index + 1]; index++; } } else { while (index < (address->DataCounter)) { //copy current element backward address->DataArray[index] = address->DataArray[index + 1]; address->AddressArray[index + 1] = address->AddressArray[index + 2]; index++; } } address->DataArray[address->DataCounter] = NULL; address->AddressArray[address->DataCounter + 1] = nullptr; } Node *Tree::SplitNode(int NewData, Node *address) { //if we need to split root if (address == root) { //create new empty root root = new Node(NULL, t); root->DataCounter = 0; root->leaf = false; //create new empty node Node *RightHalf = new Node(NULL, t); RightHalf->DataCounter = 0; //if current splitting node is not a leaf if (address->leaf != true) { //new node is not a leaf too RightHalf->leaf = false; } int MovingDataCounter = address->DataCounter; int DataToMoveUp = address->DataArray[MovingDataCounter / 2]; //mvoe first right address to new node RightHalf->AddressArray[0] = address->AddressArray[MovingDataCounter / 2 + 1]; if (RightHalf->AddressArray[0] != nullptr) { RightHalf->AddressArray[0]->ParentAddress = RightHalf; } address->AddressArray[MovingDataCounter / 2 + 1] = nullptr; //move all right data and address from current node to new one for (int i = MovingDataCounter / 2 + 1; i <= MovingDataCounter - 1; i++) { //move current data element to new node RightHalf->DataArray[i - (MovingDataCounter / 2 + 1)] = address->DataArray[i]; address->DataArray[i] = NULL; //move current+1 address element to new node RightHalf->AddressArray[i - (MovingDataCounter / 2)] = address->AddressArray[i + 1]; if (RightHalf->AddressArray[i - (MovingDataCounter / 2)] != nullptr) { RightHalf->AddressArray[i - (MovingDataCounter / 2)]->ParentAddress = RightHalf; } address->AddressArray[i + 1] = nullptr; RightHalf->DataCounter++; address->DataCounter--; } //erase middle data in current node address->DataArray[MovingDataCounter / 2] = NULL; address->DataCounter--; //move middle data up to new root //write new data root->DataArray[0] = DataToMoveUp; root->DataCounter++; //left root child is curent node root->AddressArray[0] = address; //right root child is new node root->AddressArray[1] = RightHalf; //set parent of right half RightHalf->ParentAddress = root; address->ParentAddress = root; //write new data to either old or new node if (NewData > DataToMoveUp) { //write new data to node with right half //FindAppropriatePlace(NewData, RightHalf); InsertData(NewData, RightHalf); //if moving data goes to new node -> return its address return RightHalf; } else { //write new data to node with left half (curent node) //FindAppropriatePlace(NewData, address); InsertData(NewData, address); //if moving data goes to old node -> return its address return address; } } //if we need to split node which is not root else { //create new empty node Node *RightHalf = new Node(NULL,t); RightHalf->DataCounter = 0; //if current splitting node is not a leaf if (address->leaf != true) { //new node is not a leaf too RightHalf->leaf = false; } //save current date counter to new variable int MovingDataCounter = address->DataCounter; //save middle data that we need to move up to new variable int DataToMoveUp = address->DataArray[MovingDataCounter / 2]; //mvoe first right address to new node RightHalf->AddressArray[0] = address->AddressArray[MovingDataCounter / 2 + 1]; if (RightHalf->AddressArray[0] != nullptr) { RightHalf->AddressArray[0]->ParentAddress = RightHalf; } address->AddressArray[MovingDataCounter / 2 + 1] = nullptr; //move all right data from current node to new one for (int i = (MovingDataCounter / 2 + 1); i <= (MovingDataCounter - 1); i++) { //move current data element to new node RightHalf->DataArray[i - (MovingDataCounter / 2 + 1)] = address->DataArray[i]; address->DataArray[i] = NULL; //move current+1 address element to new node RightHalf->AddressArray[i - (MovingDataCounter / 2)] = address->AddressArray[i + 1]; if (RightHalf->AddressArray[i - (MovingDataCounter / 2)] != nullptr) { RightHalf->AddressArray[i - (MovingDataCounter / 2)]->ParentAddress = RightHalf; } address->AddressArray[i + 1] = nullptr; RightHalf->DataCounter++; address->DataCounter--; } //erase middle data in current node address->DataArray[MovingDataCounter / 2] = NULL; address->DataCounter--; //write new data to either old or new node if (NewData > DataToMoveUp) { //write new data to node with right half //FindAppropriatePlace(NewData, RightHalf); InsertData(NewData, RightHalf); } else { //write new data to node with left half (curent node) //FindAppropriatePlace(NewData, address); InsertData(NewData, address); } //move middle data up to parent //check if parent has empty space if (address->ParentAddress->DataCounter < (t - 1)) { //all elements check for (int i = 0; i < (address->ParentAddress->DataCounter); i++) { //if new data less than parent current element if (DataToMoveUp < address->ParentAddress->DataArray[i]) { //move existing elements forward to set free appropriate place for new data MoveElementsForward(address->ParentAddress, i); //write new data address->ParentAddress->DataArray[i] = DataToMoveUp; address->ParentAddress->DataCounter++; //set new child (right half) of parent node address->ParentAddress->AddressArray[i+1] = RightHalf; //set parent of right half RightHalf->ParentAddress = address->ParentAddress; //splitting has finished -> exit return nullptr; } } //if data to move up is more than all existing parent data //write data to move up to parent node address->ParentAddress->DataArray[address->ParentAddress->DataCounter] = DataToMoveUp; address->ParentAddress->DataCounter++; //set new child (right half) of parent node address->ParentAddress->AddressArray[address->ParentAddress->DataCounter] = RightHalf; //set parent of right half RightHalf->ParentAddress = address->ParentAddress; //splitting has finished -> exit return nullptr; } //if parent has no empty space else { //split parent node and add data to move up from current node //return address, where moving data was moved Node *MovedDataToNode = SplitNode(DataToMoveUp, address->ParentAddress); //if parent was splitted -> here we need to have parent node adderess if (MovedDataToNode != nullptr) { RightHalf->ParentAddress = MovedDataToNode; int index = FindDataInNode(DataToMoveUp, MovedDataToNode); MovedDataToNode->AddressArray[index+1] = RightHalf; } } } } void Tree::InsertData(int NewData, Node *address) { //all elements check for (int i = 0; i < address->DataCounter; i++) { //if new data less than right half current element if (NewData < address->DataArray[i]) { //move existing elements forward to set free appropriate place for new data MoveElementsForward(address, i); //write new data address->DataArray[i] = NewData; address->DataCounter++; return; } } //if new data up is more than all existing right half data //write data to move up to right half address->DataArray[address->DataCounter] = NewData; address->DataCounter++; return; } bool Tree::DeleteData(int DataToDelete, Node *address) { //find data to delete and return address of its node Node *NodeAddress = FindData(DataToDelete, address); //if data is not found if (NodeAddress == nullptr) { return 0; } //if data to delete is found else// if(NodeAddress->leaf == true) { //find place of deleting data int PlaceToDelete = FindDataInNode(DataToDelete, NodeAddress); //delete data NodeAddress->DataArray[PlaceToDelete] = NULL; NodeAddress->DataCounter--; //move data backwards MoveElementsBackward(NodeAddress, PlaceToDelete); //if node has no data left if (NodeAddress->DataCounter == 0) { int ChildAddressIndex = 0; //find place in address array of node with deleted element in parent node for (int i = 0; i <= NodeAddress->ParentAddress->DataCounter; i++) { //if address is equal if (NodeAddress == NodeAddress->ParentAddress->AddressArray[i]) { //write its index ChildAddressIndex = i; //break from for cycle break; } } Node *LeftNode = nullptr; Node *RightNode = nullptr; Node *ParentNode = NodeAddress->ParentAddress; //if node with deleting data is first child of its parent if (ChildAddressIndex == 0) { RightNode = NodeAddress->ParentAddress->AddressArray[ChildAddressIndex + 1]; } //or if node with deleting data is last child of its parent else if (ChildAddressIndex == ParentNode->DataCounter + 1) { LeftNode = NodeAddress->ParentAddress->AddressArray[ChildAddressIndex - 1]; } else { LeftNode = NodeAddress->ParentAddress->AddressArray[ChildAddressIndex - 1]; RightNode = NodeAddress->ParentAddress->AddressArray[ChildAddressIndex + 1]; } //look left //if there is left node and it has more than 1 element -> move data from parent node down //and move last element of left node up to parent if (LeftNode != nullptr && NodeAddress->ParentAddress->AddressArray[ChildAddressIndex - 1]->DataCounter > 1) { //move parent left data down NodeAddress->DataArray[0] = ParentNode->DataArray[ChildAddressIndex - 1]; NodeAddress->DataCounter++; //move biggest data from left node up ParentNode->DataArray[ChildAddressIndex - 1] = LeftNode->DataArray[LeftNode->DataCounter - 1]; LeftNode->DataArray[LeftNode->DataCounter - 1] = NULL; LeftNode->DataCounter--; } //or look right //if there is right node and it has more than 1 element -> move data from parent node down //and move last element of left node up to parent else if(RightNode != nullptr && NodeAddress->ParentAddress->AddressArray[ChildAddressIndex + 1]->DataCounter > 1) { //move parent right data down NodeAddress->DataArray[0] = ParentNode->DataArray[ChildAddressIndex]; NodeAddress->DataCounter++; //move smallest data from right node up ParentNode->DataArray[ChildAddressIndex] = RightNode->DataArray[0]; RightNode->DataArray[0] = NULL; RightNode->DataCounter--; //move elements of right node backward MoveElementsBackward(RightNode, 0); } //if left and right node has 1 element else { //look up //if parent has nore than 1 element if (ParentNode->DataCounter > 1) { //if left node exists if (LeftNode != nullptr) { //move left parent data of child address index to the right border of left node LeftNode->DataArray[LeftNode->DataCounter] = ParentNode->DataArray[ChildAddressIndex - 1]; LeftNode->DataCounter++; ParentNode->DataCounter--; MoveElementsBackward(ParentNode, ChildAddressIndex - 1); DeleteNode(NodeAddress); } //if left node does not exists else if (RightNode != nullptr) { MoveElementsForward(RightNode, 0); //move first parents data element down to right node RightNode->DataArray[0] = ParentNode->DataArray[0]; RightNode->DataCounter++; ParentNode->DataArray[0] = NULL; ParentNode->DataCounter--; MoveElementsBackward(ParentNode, 0); DeleteNode(NodeAddress); } } } } } //mission complete return 1; } Node *Tree::FindData(int GoalData, Node *address) { //search for goal data int DataPlace = FindDataInNode(GoalData, address); Node *ResultNode; //if data is not found if (DataPlace == (t + 1)) { //if address is root and a leaf if (address == root && address->leaf == true) { //return nullptr (nothing found) return nullptr; } else { //compare all elements and find next appropriate node //all elements check for (int i = 0; i < (address->DataCounter); i++) { //if goal data less than current element if (GoalData < address->DataArray[i]) { //if child address exists if (address->AddressArray[address->DataCounter] != nullptr) { //search deep ResultNode = FindData(GoalData, address->AddressArray[i]); if (ResultNode != nullptr) { return ResultNode; } } else { //return nullptr (nothing found) return nullptr; } } } //goal data is more than existing data of current node //if child address exists if (address->AddressArray[address->DataCounter] != nullptr) { //move to right child ResultNode = FindData(GoalData, address->AddressArray[address->DataCounter]); if (ResultNode != nullptr) { return ResultNode; } } else { //return nullptr (nothing found) return nullptr; } } } //if data is found else { return address; } } void Tree::DeleteNode(Node *address) { //if we need to delete root if (address == root) { delete root; } //if we need to delete node else { delete address; } } void Tree::PrintTree(Node *address) { for (int i = 0; i < (t - 1); i++) { cout << address->DataArray[i] << ", "; } cout << endl; for (int j = 0; j < t; j++) { if (address->AddressArray[j] != nullptr) { PrintTree(address->AddressArray[j]); } } } int Tree::FindDataInNode(int GoalData, Node* address) { //all elements check for (int i = 0; i < (address->DataCounter); i++) { //if data equals current data element if (GoalData == address->DataArray[i]) { return i; } } //if data is not found return (t + 1); } int main() { Tree MyTree(4); MyTree.AddData(8); MyTree.AddData(13); MyTree.AddData(5); MyTree.AddData(0); MyTree.AddData(16); MyTree.AddData(7); MyTree.AddData(23); MyTree.AddData(48); MyTree.AddData(15); MyTree.AddData(1); MyTree.AddData(2); cout << "Add data" << endl; MyTree.PrintTree(MyTree.root); MyTree.DeleteData(0, MyTree.root); MyTree.DeleteData(7, MyTree.root); MyTree.DeleteData(15, MyTree.root); MyTree.DeleteData(48, MyTree.root); MyTree.DeleteData(13, MyTree.root); MyTree.DeleteData(1, MyTree.root); MyTree.DeleteData(23, MyTree.root); cout << "Delete data" << endl; MyTree.PrintTree(MyTree.root); return 0; }
0f2ffe56b7b31f785b9efcbca795fd3e6f8211cf
257764907499b8278cc5e0eeae6447e1e9fcf440
/getLine.cpp
164ae4eef8eca54b12d3f0a7967e4c033de5f33a
[]
no_license
NiteshPidiparars/CodeBlock
b772ac27168928c836fece0b465ec1fd85b33c68
d71f48591b54f88049029be4ad45c2e7d6721f9f
refs/heads/master
2023-04-19T06:54:20.171948
2021-05-08T13:42:20
2021-05-08T13:42:20
365,522,594
0
0
null
null
null
null
UTF-8
C++
false
false
200
cpp
getLine.cpp
#include<iostream> #include<conio.h> using namespace std; int main() { string name; cout<<"Enter your name: "; getline(cin,name); cout<<"Hello! This is "<<name<<".\n"; return 0; }
3e9ace8552509031d0253c5a42447fc3c31cfdce
3de5009cf08eece31c07332bd827bf10acd88134
/LoggerBuffer.h
d2ba0a6c75bfba8c51a897fcbdb4544ba23a5861
[]
no_license
MegaGabi/ThreadSafeLogger
9a4993dcf9bec7e106e8a6adf645c37bf88266dc
84b82d9559030e3c00cfa875d50903c3cc25b0e9
refs/heads/main
2023-04-23T17:26:02.371943
2021-05-05T08:06:20
2021-05-05T08:06:20
364,503,294
0
0
null
null
null
null
UTF-8
C++
false
false
792
h
LoggerBuffer.h
#pragma once #include <sstream> class Logger; // This class stores all chained arguments that was passed to operator<< // After that it sends it's stored values to Logger via destructor class LoggerBuffer { public: LoggerBuffer(Logger& logger) : _log(logger) {} LoggerBuffer(LoggerBuffer&& buf) : _buffer(std::move(buf._buffer)), _log(buf._log) {} LoggerBuffer(const LoggerBuffer&) = delete; LoggerBuffer& operator=(const LoggerBuffer&) = delete; LoggerBuffer& operator=(LoggerBuffer&&) = delete; template<typename Type> LoggerBuffer& operator<<(const Type& toPrint); ~LoggerBuffer(); private: std::stringstream _buffer; Logger& _log; }; template<typename Type> inline LoggerBuffer& LoggerBuffer::operator<<(const Type& toPrint) { _buffer << toPrint; return *this; }
c6ecd85723f5ee271c7203f271de632dc10ca522
f20e965e19b749e84281cb35baea6787f815f777
/Online/Online/SSE2/src/run/code.cpp
e48ec6abe625c5b29f506fa709089d3f241c032a
[]
no_license
marromlam/lhcb-software
f677abc9c6a27aa82a9b68c062eab587e6883906
f3a80ecab090d9ec1b33e12b987d3d743884dc24
refs/heads/master
2020-12-23T15:26:01.606128
2016-04-08T15:48:59
2016-04-08T15:48:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
174,653
cpp
code.cpp
/* ================= Algorithm execution list: */ { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Rec/Header","/Event/Rec/Status",0}; AlgConfig cfg("BrunelInit",manager,inputs,outputs,9.809e+02,1.315e+03); cfg.setDaughters(daughters); cfg.parent = "InitBrunelSeq"; cfg.order = 5; cfg.level = 4; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("BrunelEventCount",manager,inputs,outputs,1.537e+01,2.938e+00); cfg.setDaughters(daughters); cfg.parent = "InitBrunelSeq"; cfg.order = 6; cfg.level = 4; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("BrunelBankKiller",manager,inputs,outputs,7.203e+01,2.820e+01); cfg.setDaughters(daughters); cfg.parent = "InitBrunelSeq"; cfg.order = 7; cfg.level = 4; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN",0}; const char* outputs[] = {0}; AlgConfig cfg("FilterNoBeam",manager,inputs,outputs,1.054e+02,1.297e+02); cfg.setDaughters(daughters); cfg.parent = "LumiNoBeamSeq"; cfg.order = 11; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiDecodeNoBeam",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "LumiNoBeamSeq"; cfg.order = 12; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiFilterNoBeam",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "LumiNoBeamSeq"; cfg.order = 13; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiCountNoBeam",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "LumiNoBeamSeq"; cfg.order = 14; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN",0}; const char* outputs[] = {0}; AlgConfig cfg("FilterBeamCrossing",manager,inputs,outputs,6.997e+01,2.687e+01); cfg.setDaughters(daughters); cfg.parent = "LumiBeamCrossingSeq"; cfg.order = 16; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Hlt/LumiSummary",0}; AlgConfig cfg("LumiDecodeBeamCrossing",manager,inputs,outputs,2.539e+02,2.001e+02); cfg.setDaughters(daughters); cfg.parent = "LumiBeamCrossingSeq"; cfg.order = 17; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Hlt/LumiSummary",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiFilterBeamCrossing",manager,inputs,outputs,1.434e+02,1.118e+02); cfg.setDaughters(daughters); cfg.parent = "LumiBeamCrossingSeq"; cfg.order = 18; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent","/Event/Hlt/LumiSummary",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiCountBeamCrossing",manager,inputs,outputs,1.459e+03,1.686e+03); cfg.setDaughters(daughters); cfg.parent = "LumiBeamCrossingSeq"; cfg.order = 19; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN",0}; const char* outputs[] = {0}; AlgConfig cfg("FilterBeam1",manager,inputs,outputs,6.743e+01,2.167e+01); cfg.setDaughters(daughters); cfg.parent = "LumiBeam1Seq"; cfg.order = 21; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Hlt/LumiSummary",0}; AlgConfig cfg("LumiDecodeBeam1",manager,inputs,outputs,3.330e+02,5.400e+01); cfg.setDaughters(daughters); cfg.parent = "LumiBeam1Seq"; cfg.order = 22; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Hlt/LumiSummary",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiFilterBeam1",manager,inputs,outputs,1.675e+02,1.750e+01); cfg.setDaughters(daughters); cfg.parent = "LumiBeam1Seq"; cfg.order = 23; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent","/Event/Hlt/LumiSummary",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiCountBeam1",manager,inputs,outputs,5.345e+02,2.450e+01); cfg.setDaughters(daughters); cfg.parent = "LumiBeam1Seq"; cfg.order = 24; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN",0}; const char* outputs[] = {0}; AlgConfig cfg("FilterBeam2",manager,inputs,outputs,6.450e+01,2.038e+01); cfg.setDaughters(daughters); cfg.parent = "LumiBeam2Seq"; cfg.order = 26; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Hlt/LumiSummary","/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiDecodeBeam2",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "LumiBeam2Seq"; cfg.order = 27; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Hlt/LumiSummary","/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiFilterBeam2",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "LumiBeam2Seq"; cfg.order = 28; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Hlt/LumiSummary","/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiCountBeam2",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "LumiBeam2Seq"; cfg.order = 29; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN",0}; const char* outputs[] = {0}; AlgConfig cfg("TimeSpanFilter",manager,inputs,outputs,6.160e+01,2.036e+01); cfg.setDaughters(daughters); cfg.parent = "TimeSpanSeq"; cfg.order = 31; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("TimeSpanAccounting",manager,inputs,outputs,1.871e+02,9.779e+01); cfg.setDaughters(daughters); cfg.parent = "TimeSpanSeq"; cfg.order = 32; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Hlt/LumiSummary","/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("EventAccount",manager,inputs,outputs,1.747e+01,6.339e+00); cfg.setDaughters(daughters); cfg.parent = "LumiCounters"; cfg.order = 33; cfg.level = 4; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Hlt/LumiSummary","/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("LumiFilter",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "LumiSeq"; cfg.order = 34; cfg.level = 3; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("PhysFilter",manager,inputs,outputs,1.382e+02,4.878e+01); cfg.setDaughters(daughters); cfg.parent = "LumiSeq"; cfg.order = 35; cfg.level = 3; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Hlt/DecReports",0}; AlgConfig cfg("HltDecReportsDecoder",manager,inputs,outputs,9.084e+04,4.375e+05); cfg.setDaughters(daughters); cfg.parent = "HltfilterSeq"; cfg.order = 39; cfg.level = 4; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Hlt/DecReports",0}; const char* outputs[] = {0}; AlgConfig cfg("HltErrorFilter",manager,inputs,outputs,1.678e+02,2.235e+02); cfg.setDaughters(daughters); cfg.parent = "HltfilterSeq"; cfg.order = 40; cfg.level = 4; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Rec/Header","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("HltErrorProc",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "HltErrorSeq"; cfg.order = 41; cfg.level = 3; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("PrsCheckBanks",manager,inputs,outputs,9.924e+01,4.663e+01); cfg.setDaughters(daughters); cfg.parent = "PrsBanksHandler"; cfg.order = 45; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/DAQ/Status","/Event/Raw/Prs/Adcs",0}; AlgConfig cfg("PrsADCs",manager,inputs,outputs,1.713e+03,1.300e+03); cfg.setDaughters(daughters); cfg.parent = "PrsBanksHandler"; cfg.order = 46; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Trig/L0/PrsRaw",0}; AlgConfig cfg("PrsL0Bit",manager,inputs,outputs,1.214e+03,2.356e+02); cfg.setDaughters(daughters); cfg.parent = "PrsBanksHandler"; cfg.order = 47; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Trig/L0/SpdRaw",0}; AlgConfig cfg("SpdL0Bit",manager,inputs,outputs,1.203e+03,1.795e+02); cfg.setDaughters(daughters); cfg.parent = "PrsBanksHandler"; cfg.order = 48; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/Raw/Prs/Adcs","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("PrsSpdFillRawBuffer",manager,inputs,outputs,6.891e+02,5.323e+02); cfg.setDaughters(daughters); cfg.parent = "PrsBanksHandler"; cfg.order = 49; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("RemovePrsPackedBanks",manager,inputs,outputs,2.521e+02,3.317e+02); cfg.setDaughters(daughters); cfg.parent = "PrsBanksHandler"; cfg.order = 50; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("EcalCheckBanks",manager,inputs,outputs,9.100e+01,3.913e+01); cfg.setDaughters(daughters); cfg.parent = "EcalBanksHandler"; cfg.order = 52; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Raw/Ecal/Adcs",0}; AlgConfig cfg("EcalADCs",manager,inputs,outputs,3.847e+03,3.547e+02); cfg.setDaughters(daughters); cfg.parent = "EcalBanksHandler"; cfg.order = 53; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Trig/L0/EcalRaw",0}; AlgConfig cfg("EcalTrigFromRaw",manager,inputs,outputs,1.556e+03,3.023e+02); cfg.setDaughters(daughters); cfg.parent = "EcalBanksHandler"; cfg.order = 54; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/Raw/Ecal/Adcs","/Event/Trig/L0/EcalRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("EcalFillRawBuffer",manager,inputs,outputs,2.009e+02,2.254e+02); cfg.setDaughters(daughters); cfg.parent = "EcalBanksHandler"; cfg.order = 55; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("RemoveEcalPackedBanks",manager,inputs,outputs,3.513e+02,3.749e+01); cfg.setDaughters(daughters); cfg.parent = "EcalBanksHandler"; cfg.order = 56; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("HcalCheckBanks",manager,inputs,outputs,8.724e+01,3.297e+01); cfg.setDaughters(daughters); cfg.parent = "HcalBanksHandler"; cfg.order = 58; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Raw/Hcal/Adcs",0}; AlgConfig cfg("HcalADCs",manager,inputs,outputs,1.191e+03,1.234e+02); cfg.setDaughters(daughters); cfg.parent = "HcalBanksHandler"; cfg.order = 59; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Trig/L0/HcalRaw",0}; AlgConfig cfg("HcalTrigFromRaw",manager,inputs,outputs,5.519e+02,8.423e+01); cfg.setDaughters(daughters); cfg.parent = "HcalBanksHandler"; cfg.order = 60; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/Raw/Hcal/Adcs","/Event/Trig/L0/HcalRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("HcalFillRawBuffer",manager,inputs,outputs,1.541e+02,9.349e+01); cfg.setDaughters(daughters); cfg.parent = "HcalBanksHandler"; cfg.order = 61; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("RemoveHcalPackedBanks",manager,inputs,outputs,1.433e+02,2.324e+01); cfg.setDaughters(daughters); cfg.parent = "HcalBanksHandler"; cfg.order = 62; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters",0}; AlgConfig cfg("DecodeVeloClusters",manager,inputs,outputs,1.079e+03,1.369e+03); cfg.setDaughters(daughters); cfg.parent = "RecoDecodingSeq"; cfg.order = 65; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Raw/TT/Clusters","/Event/Rec/TT/Summary",0}; AlgConfig cfg("CreateTTClusters",manager,inputs,outputs,1.292e+03,1.721e+03); cfg.setDaughters(daughters); cfg.parent = "RecoDecodingSeq"; cfg.order = 66; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Raw/TT/LiteClusters",0}; AlgConfig cfg("CreateTTLiteClusters",manager,inputs,outputs,6.230e+02,3.776e+02); cfg.setDaughters(daughters); cfg.parent = "RecoDecodingSeq"; cfg.order = 67; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Raw/IT/Clusters","/Event/Rec/IT/Summary",0}; AlgConfig cfg("CreateITClusters",manager,inputs,outputs,1.092e+03,1.632e+03); cfg.setDaughters(daughters); cfg.parent = "RecoDecodingSeq"; cfg.order = 68; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/Raw/IT/LiteClusters",0}; AlgConfig cfg("CreateITLiteClusters",manager,inputs,outputs,5.585e+02,3.585e+02); cfg.setDaughters(daughters); cfg.parent = "RecoDecodingSeq"; cfg.order = 69; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Velo/LiteClusters",0}; const char* outputs[] = {"/Event/Rec/Track/Velo",0}; AlgConfig cfg("FastVeloTracking",manager,inputs,outputs,1.556e+03,3.353e+03); cfg.setDaughters(daughters); cfg.parent = "RecoVELOSeq"; cfg.order = 71; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/Raw/IT/LiteClusters","/Event/Raw/TT/LiteClusters","/Event/Rec/Track/Velo",0}; const char* outputs[] = {"/Event/Rec/Track/Forward",0}; AlgConfig cfg("PatForward",manager,inputs,outputs,6.233e+03,1.169e+04); cfg.setDaughters(daughters); cfg.parent = "TrackForwardPatSeq"; cfg.order = 78; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {"/Event/Rec/Track/Seed",0}; AlgConfig cfg("PatSeeding",manager,inputs,outputs,3.314e+03,6.407e+03); cfg.setDaughters(daughters); cfg.parent = "TrackSeedPatSeq"; cfg.order = 80; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Seed","/Event/Rec/Track/Velo",0}; const char* outputs[] = {"/Event/Rec/Track/Match",0}; AlgConfig cfg("PatMatch",manager,inputs,outputs,5.034e+02,8.538e+02); cfg.setDaughters(daughters); cfg.parent = "TrackMatchPatSeq"; cfg.order = 82; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/TT/LiteClusters","/Event/Rec/Track/Match","/Event/Rec/Track/Seed",0}; const char* outputs[] = {"/Event/Rec/Track/Downstream",0}; AlgConfig cfg("PatDownstream",manager,inputs,outputs,1.589e+03,2.748e+03); cfg.setDaughters(daughters); cfg.parent = "TrackDownstreamPatSeq"; cfg.order = 84; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/TT/Clusters","/Event/Raw/Velo/Clusters","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Velo",0}; const char* outputs[] = {"/Event/Rec/Track/VeloTT",0}; AlgConfig cfg("PatVeloTT",manager,inputs,outputs,8.719e+03,2.808e+04); cfg.setDaughters(daughters); cfg.parent = "TrackVeloTTPatSeq"; cfg.order = 86; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Seed","/Event/Rec/Track/VeloTT",0}; const char* outputs[] = {"/Event/Rec/Track/AllBest",0}; AlgConfig cfg("TrackEventCloneKiller",manager,inputs,outputs,5.704e+02,7.621e+02); cfg.setDaughters(daughters); cfg.parent = "TrackFitSeq"; cfg.order = 88; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/IT/LiteClusters","/Event/Raw/TT/LiteClusters","/Event/Rec/Track/AllBest",0}; const char* outputs[] = {0}; AlgConfig cfg("InitBestFit",manager,inputs,outputs,2.411e+03,6.362e+03); cfg.setDaughters(daughters); cfg.parent = "TrackFitSeq"; cfg.order = 89; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/IT/Clusters","/Event/Raw/TT/Clusters","/Event/Raw/Velo/Clusters","/Event/Rec/Track/AllBest",0}; const char* outputs[] = {0}; AlgConfig cfg("FitBest",manager,inputs,outputs,2.189e+05,6.762e+05); cfg.setDaughters(daughters); cfg.parent = "TrackFitSeq"; cfg.order = 90; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/AllBest",0}; const char* outputs[] = {"/Event/Rec/Track/Best",0}; AlgConfig cfg("CopyBest",manager,inputs,outputs,9.451e+02,1.829e+03); cfg.setDaughters(daughters); cfg.parent = "TrackFitSeq"; cfg.order = 91; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best","/Event/Rec/Track/Velo",0}; const char* outputs[] = {"/Event/Rec/Track/PreparedVelo",0}; AlgConfig cfg("TrackPrepareVelo",manager,inputs,outputs,2.124e+02,2.225e+02); cfg.setDaughters(daughters); cfg.parent = "TrackVeloFitSeq"; cfg.order = 93; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Velo/Clusters","/Event/Rec/Track/PreparedVelo",0}; const char* outputs[] = {0}; AlgConfig cfg("FitVelo",manager,inputs,outputs,1.504e+04,4.632e+04); cfg.setDaughters(daughters); cfg.parent = "TrackVeloFitSeq"; cfg.order = 94; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best","/Event/Rec/Track/PreparedVelo",0}; const char* outputs[] = {0}; AlgConfig cfg("CopyVelo",manager,inputs,outputs,2.390e+02,4.757e+02); cfg.setDaughters(daughters); cfg.parent = "TrackVeloFitSeq"; cfg.order = 95; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Link/Rec/Track/BestClones",0}; AlgConfig cfg("FindTrackClones",manager,inputs,outputs,2.998e+03,7.902e+03); cfg.setDaughters(daughters); cfg.parent = "TrackClonesSeq"; cfg.order = 98; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Link/Rec/Track/BestClones","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("FlagTrackClones",manager,inputs,outputs,8.492e+02,2.423e+03); cfg.setDaughters(daughters); cfg.parent = "TrackClonesSeq"; cfg.order = 99; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackAddLikelihood",manager,inputs,outputs,1.051e+04,3.085e+04); cfg.setDaughters(daughters); cfg.parent = "TrackAddExtraInfoSeq"; cfg.order = 100; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/TT/Clusters","/Event/Raw/Velo/Clusters","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackAddNNGhostId",manager,inputs,outputs,2.035e+03,7.107e+03); cfg.setDaughters(daughters); cfg.parent = "TrackAddExtraInfoSeq"; cfg.order = 101; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackEraseExtraInfo",manager,inputs,outputs,9.944e+01,1.214e+02); cfg.setDaughters(daughters); cfg.parent = "TrackEraseExtraInformationSeq"; cfg.order = 103; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/Weights",0}; AlgConfig cfg("PatPVOffline",manager,inputs,outputs,2.644e+03,6.931e+03); cfg.setDaughters(daughters); cfg.parent = "RecoVertexSeq"; cfg.order = 105; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best","/Event/Rec/Vertex/Primary",0}; const char* outputs[] = {"/Event/Rec/Vertex/V0",0}; AlgConfig cfg("TrackV0Finder",manager,inputs,outputs,1.255e+03,4.317e+03); cfg.setDaughters(daughters); cfg.parent = "RecoVertexSeq"; cfg.order = 106; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {"/Event/Rec/Rich/RecoEvent/Offline/Status",0}; AlgConfig cfg("CheckProcOfflineStatus",manager,inputs,outputs,2.443e+02,3.395e+02); cfg.setDaughters(daughters); cfg.parent = "RichRecInitOfflineSeq"; cfg.order = 109; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("DecodeRawRichOffline",manager,inputs,outputs,3.479e+03,7.834e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflinePixelsSeq"; cfg.order = 111; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {"/Event/Rec/Rich/RecoEvent/Offline/Pixels",0}; AlgConfig cfg("CreateOfflinePixels",manager,inputs,outputs,6.158e+03,1.207e+04); cfg.setDaughters(daughters); cfg.parent = "RichOfflinePixelsSeq"; cfg.order = 112; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Tracks",0}; AlgConfig cfg("CreateOfflineTracks",manager,inputs,outputs,2.221e+04,5.934e+04); cfg.setDaughters(daughters); cfg.parent = "RichOfflineTracksSeq"; cfg.order = 114; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {"/Event/Rec/Rich/RecoEvent/Offline/Photons",0}; AlgConfig cfg("CreateOfflinePhotons",manager,inputs,outputs,2.618e+04,8.394e+04); cfg.setDaughters(daughters); cfg.parent = "RichOfflinePhotonsSeq"; cfg.order = 116; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Hcal/Adcs","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Prs/Adcs","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsAll",0}; AlgConfig cfg("OfflineENNFinderR1GasTop",manager,inputs,outputs,1.216e+03,2.649e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineENNRingFinderSeq"; cfg.order = 118; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsAll",0}; const char* outputs[] = {0}; AlgConfig cfg("OfflineENNFinderR1GasBottom",manager,inputs,outputs,3.791e+02,8.711e+02); cfg.setDaughters(daughters); cfg.parent = "RichOfflineENNRingFinderSeq"; cfg.order = 119; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsAll",0}; const char* outputs[] = {0}; AlgConfig cfg("OfflineENNFinderR2GasLeft",manager,inputs,outputs,1.035e+03,3.176e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineENNRingFinderSeq"; cfg.order = 120; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsAll",0}; const char* outputs[] = {0}; AlgConfig cfg("OfflineENNFinderR2GasRight",manager,inputs,outputs,8.479e+02,3.069e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineENNRingFinderSeq"; cfg.order = 121; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsAll",0}; const char* outputs[] = {"/Event/Rec/Rich/RecoEvent/Offline/Segments",0}; AlgConfig cfg("OfflineENNRingsSegAssoc",manager,inputs,outputs,6.314e+02,1.758e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineENNRingFinderSeq"; cfg.order = 122; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsAll",0}; const char* outputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsBest",0}; AlgConfig cfg("OfflineBestENNRings",manager,inputs,outputs,5.424e+02,1.856e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineENNRingFinderSeq"; cfg.order = 123; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsBest",0}; const char* outputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsIsolated",0}; AlgConfig cfg("OfflineIsolatedENNRings",manager,inputs,outputs,7.350e+02,2.338e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineENNRingFinderSeq"; cfg.order = 124; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Hcal/Adcs","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Prs/Adcs","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichOfflineGPIDInit",manager,inputs,outputs,2.112e+01,2.964e+01); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDInitSeq"; cfg.order = 128; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RichOfflineGPIDDigSel",manager,inputs,outputs,8.752e+01,1.495e+02); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDInitSeq"; cfg.order = 129; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {"/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks",0}; AlgConfig cfg("RichOfflineGPIDTrSel",manager,inputs,outputs,6.029e+02,1.205e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDInitSeq"; cfg.order = 130; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Hcal/Adcs","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Prs/Adcs","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichOfflineBckEstIt0",manager,inputs,outputs,6.074e+02,1.718e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDLLSeq"; cfg.order = 132; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RichOfflineGPIDLLIt0",manager,inputs,outputs,1.914e+04,5.880e+04); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDLLSeq"; cfg.order = 133; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Hcal/Adcs","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Prs/Adcs","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichOfflineBckEstIt1",manager,inputs,outputs,4.147e+02,1.249e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDLLSeq"; cfg.order = 134; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RichOfflineGPIDLLIt1",manager,inputs,outputs,1.477e+03,4.882e+03); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDLLSeq"; cfg.order = 135; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/GlobalPID/Offline/Tracks",0}; const char* outputs[] = {0}; AlgConfig cfg("RichOfflineGPIDFin",manager,inputs,outputs,8.592e+01,2.676e+02); cfg.setDaughters(daughters); cfg.parent = "RichOfflineGPIDSeq"; cfg.order = 136; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Status",0}; const char* outputs[] = {"/Event/Rec/Rich/PIDs",0}; AlgConfig cfg("MergeOfflineRichPIDs",manager,inputs,outputs,3.016e+02,4.375e+02); cfg.setDaughters(daughters); cfg.parent = "RichOfflinePIDSeq"; cfg.order = 137; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Raw/Spd/Digits",0}; AlgConfig cfg("SpdFromRaw",manager,inputs,outputs,3.545e+02,4.454e+02); cfg.setDaughters(daughters); cfg.parent = "CaloDigits"; cfg.order = 141; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Raw/Prs/Digits",0}; AlgConfig cfg("PrsFromRaw",manager,inputs,outputs,3.159e+02,2.821e+02); cfg.setDaughters(daughters); cfg.parent = "CaloDigits"; cfg.order = 142; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Raw/Ecal/Digits",0}; AlgConfig cfg("EcalZSup",manager,inputs,outputs,2.776e+02,1.723e+02); cfg.setDaughters(daughters); cfg.parent = "CaloDigits"; cfg.order = 143; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Raw/Hcal/Digits",0}; AlgConfig cfg("HcalZSup",manager,inputs,outputs,2.297e+02,5.198e+01); cfg.setDaughters(daughters); cfg.parent = "CaloDigits"; cfg.order = 144; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Digits","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits",0}; const char* outputs[] = {0}; AlgConfig cfg("CaloDigitFilter",manager,inputs,outputs,1.417e+04,6.719e+03); cfg.setDaughters(daughters); cfg.parent = "ClusterReco"; cfg.order = 146; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Ecal/Digits",0}; const char* outputs[] = {"/Event/Rec/Calo/EcalClusters",0}; AlgConfig cfg("EcalClust",manager,inputs,outputs,1.792e+03,3.730e+03); cfg.setDaughters(daughters); cfg.parent = "ClusterReco"; cfg.order = 147; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalClusters",0}; const char* outputs[] = {0}; AlgConfig cfg("EcalShare",manager,inputs,outputs,8.154e+02,1.761e+03); cfg.setDaughters(daughters); cfg.parent = "ClusterReco"; cfg.order = 148; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalClusters",0}; const char* outputs[] = {0}; AlgConfig cfg("EcalCovar",manager,inputs,outputs,3.356e+02,7.154e+02); cfg.setDaughters(daughters); cfg.parent = "ClusterReco"; cfg.order = 149; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/InAccEcal",0}; AlgConfig cfg("InECAL",manager,inputs,outputs,9.818e+02,2.149e+03); cfg.setDaughters(daughters); cfg.parent = "CaloTrackMatch"; cfg.order = 152; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/InAccEcal","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/ClusterMatch",0}; AlgConfig cfg("ClusterMatch",manager,inputs,outputs,1.736e+03,3.551e+03); cfg.setDaughters(daughters); cfg.parent = "CaloTrackMatch"; cfg.order = 153; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalClusters",0}; const char* outputs[] = {"/Event/Rec/Calo/Photons",0}; AlgConfig cfg("SinglePhotonRec",manager,inputs,outputs,5.821e+03,1.073e+04); cfg.setDaughters(daughters); cfg.parent = "PhotonReco"; cfg.order = 154; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/EcalClusters",0}; const char* outputs[] = {"/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/SplitPhotons",0}; AlgConfig cfg("MergedPi0Rec",manager,inputs,outputs,2.795e+02,9.938e+01); cfg.setDaughters(daughters); cfg.parent = "MergedPi0Reco"; cfg.order = 156; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalClusters",0}; const char* outputs[] = {"/Event/Rec/Calo/Electrons",0}; AlgConfig cfg("SingleElectronRec",manager,inputs,outputs,8.906e+02,2.332e+03); cfg.setDaughters(daughters); cfg.parent = "ElectronReco"; cfg.order = 158; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/InAccSpd",0}; AlgConfig cfg("InSPD",manager,inputs,outputs,3.024e+02,4.282e+02); cfg.setDaughters(daughters); cfg.parent = "InCaloAcceptance"; cfg.order = 163; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/InAccPrs",0}; AlgConfig cfg("InPRS",manager,inputs,outputs,2.603e+02,3.646e+02); cfg.setDaughters(daughters); cfg.parent = "InCaloAcceptance"; cfg.order = 164; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/InAccHcal",0}; AlgConfig cfg("InHCAL",manager,inputs,outputs,2.479e+02,3.519e+02); cfg.setDaughters(daughters); cfg.parent = "InCaloAcceptance"; cfg.order = 165; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/InAccBrem",0}; AlgConfig cfg("InBREM",manager,inputs,outputs,1.965e+02,1.872e+02); cfg.setDaughters(daughters); cfg.parent = "InCaloAcceptance"; cfg.order = 166; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/Electrons","/Event/Rec/Calo/InAccEcal","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/ElectronMatch",0}; AlgConfig cfg("ElectronMatch",manager,inputs,outputs,1.310e+03,3.437e+03); cfg.setDaughters(daughters); cfg.parent = "CaloMatch"; cfg.order = 168; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/Photons","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/BremMatch",0}; AlgConfig cfg("BremMatch",manager,inputs,outputs,9.300e+02,1.951e+03); cfg.setDaughters(daughters); cfg.parent = "CaloMatch"; cfg.order = 169; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Spd/Digits","/Event/Rec/Calo/InAccSpd","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/SpdE",0}; AlgConfig cfg("SpdE",manager,inputs,outputs,8.072e+02,1.815e+03); cfg.setDaughters(daughters); cfg.parent = "CaloEnergy"; cfg.order = 171; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Prs/Digits","/Event/Rec/Calo/InAccPrs","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/PrsE",0}; AlgConfig cfg("PrsE",manager,inputs,outputs,2.499e+02,2.263e+02); cfg.setDaughters(daughters); cfg.parent = "CaloEnergy"; cfg.order = 172; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Ecal/Digits","/Event/Rec/Calo/InAccEcal","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/EcalE",0}; AlgConfig cfg("EcalE",manager,inputs,outputs,3.434e+02,4.759e+02); cfg.setDaughters(daughters); cfg.parent = "CaloEnergy"; cfg.order = 173; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Hcal/Digits","/Event/Rec/Calo/InAccHcal","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/HcalE",0}; AlgConfig cfg("HcalE",manager,inputs,outputs,3.449e+02,5.192e+02); cfg.setDaughters(daughters); cfg.parent = "CaloEnergy"; cfg.order = 174; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/ElectronMatch","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/EcalChi2",0}; AlgConfig cfg("EcalChi22ID",manager,inputs,outputs,3.936e+02,4.857e+02); cfg.setDaughters(daughters); cfg.parent = "CaloChi2"; cfg.order = 176; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/BremMatch","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/BremChi2",0}; AlgConfig cfg("BremChi22ID",manager,inputs,outputs,2.015e+02,4.456e+01); cfg.setDaughters(daughters); cfg.parent = "CaloChi2"; cfg.order = 177; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/ClusterMatch","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Calo/ClusChi2",0}; AlgConfig cfg("ClusChi22ID",manager,inputs,outputs,3.367e+02,3.874e+02); cfg.setDaughters(daughters); cfg.parent = "CaloChi2"; cfg.order = 178; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/PrsE",0}; const char* outputs[] = {"/Event/Rec/Calo/PrsPIDe",0}; AlgConfig cfg("PrsPIDe",manager,inputs,outputs,2.113e+02,2.342e+02); cfg.setDaughters(daughters); cfg.parent = "CaloDLLe"; cfg.order = 180; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalChi2",0}; const char* outputs[] = {"/Event/Rec/Calo/EcalPIDe",0}; AlgConfig cfg("EcalPIDe",manager,inputs,outputs,1.435e+02,3.139e+01); cfg.setDaughters(daughters); cfg.parent = "CaloDLLe"; cfg.order = 181; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/BremChi2",0}; const char* outputs[] = {"/Event/Rec/Calo/BremPIDe",0}; AlgConfig cfg("BremPIDe",manager,inputs,outputs,1.358e+02,2.686e+01); cfg.setDaughters(daughters); cfg.parent = "CaloDLLe"; cfg.order = 182; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/HcalE",0}; const char* outputs[] = {"/Event/Rec/Calo/HcalPIDe",0}; AlgConfig cfg("HcalPIDe",manager,inputs,outputs,1.354e+02,2.438e+01); cfg.setDaughters(daughters); cfg.parent = "CaloDLLe"; cfg.order = 183; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalE",0}; const char* outputs[] = {"/Event/Rec/Calo/EcalPIDmu",0}; AlgConfig cfg("EcalPIDmu",manager,inputs,outputs,1.347e+02,2.160e+01); cfg.setDaughters(daughters); cfg.parent = "CaloDLLmu"; cfg.order = 185; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/HcalE",0}; const char* outputs[] = {"/Event/Rec/Calo/HcalPIDmu",0}; AlgConfig cfg("HcalPIDmu",manager,inputs,outputs,1.391e+02,2.599e+01); cfg.setDaughters(daughters); cfg.parent = "CaloDLLmu"; cfg.order = 186; cfg.level = 9; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Hcal/Digits","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Photons",0}; const char* outputs[] = {"/Event/Rec/Calo/PhotonID",0}; AlgConfig cfg("PhotonID",manager,inputs,outputs,2.242e+03,4.614e+03); cfg.setDaughters(daughters); cfg.parent = "NeutralPIDs"; cfg.order = 188; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/MergedPi0s",0}; const char* outputs[] = {"/Event/Rec/Calo/MergedID",0}; AlgConfig cfg("MergedID",manager,inputs,outputs,1.415e+02,3.708e+01); cfg.setDaughters(daughters); cfg.parent = "NeutralPIDs"; cfg.order = 189; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/SplitPhotons",0}; const char* outputs[] = {"/Event/Rec/Calo/PhotonFromMergedID",0}; AlgConfig cfg("PhotonFromMergedID",manager,inputs,outputs,1.357e+02,1.910e+01); cfg.setDaughters(daughters); cfg.parent = "NeutralPIDs"; cfg.order = 190; cfg.level = 8; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent","/Event/DAQ/Status",0}; const char* outputs[] = {"/Event/Raw/Muon/Coords",0}; AlgConfig cfg("MuonRec",manager,inputs,outputs,1.143e+03,1.580e+03); cfg.setDaughters(daughters); cfg.parent = "RecoMUONSeq"; cfg.order = 192; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Muon/Coords","/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/Muon/MuonPID","/Event/Rec/Track/Muon",0}; AlgConfig cfg("MuonIDAlg",manager,inputs,outputs,6.832e+03,2.078e+04); cfg.setDaughters(daughters); cfg.parent = "MuonIDSeq"; cfg.order = 194; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/Rec/ProtoP/Charged",0}; AlgConfig cfg("ChargedProtoPMaker",manager,inputs,outputs,6.710e+02,1.443e+03); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 197; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Hcal/Digits","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddEcal",manager,inputs,outputs,1.629e+03,2.742e+03); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 198; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Hcal/Digits","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddBrem",manager,inputs,outputs,1.708e+03,4.206e+03); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 199; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccHcal","/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddHcal",manager,inputs,outputs,9.738e+02,3.026e+03); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 200; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddPrs",manager,inputs,outputs,2.934e+02,8.477e+01); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 201; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/SpdE","/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddSpd",manager,inputs,outputs,2.303e+02,7.247e+01); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 202; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddVeloDEDX",manager,inputs,outputs,2.759e+02,7.438e+02); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 203; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged","/Event/Rec/Rich/PIDs",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddRich",manager,inputs,outputs,5.336e+02,1.069e+03); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 204; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPAddMuon",manager,inputs,outputs,4.607e+02,9.384e+02); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 205; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPCombDLLs",manager,inputs,outputs,1.411e+02,1.753e+02); cfg.setDaughters(daughters); cfg.parent = "ChargedProtoParticles"; cfg.order = 206; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDLongElectron",manager,inputs,outputs,4.347e+02,1.083e+03); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 208; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDLongMuon",manager,inputs,outputs,1.001e+02,1.428e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 209; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDLongPion",manager,inputs,outputs,2.596e+02,6.632e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 210; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDLongKaon",manager,inputs,outputs,2.568e+02,6.512e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 211; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDLongProton",manager,inputs,outputs,2.669e+02,6.820e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 212; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDLongGhost",manager,inputs,outputs,2.461e+02,6.234e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 213; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDDownstreamElectron",manager,inputs,outputs,1.152e+02,2.198e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 214; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDDownstreamMuon",manager,inputs,outputs,5.648e+01,2.702e+01); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 215; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDDownstreamPion",manager,inputs,outputs,1.154e+02,2.229e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 216; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDDownstreamKaon",manager,inputs,outputs,1.174e+02,2.372e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 217; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDDownstreamProton",manager,inputs,outputs,1.148e+02,2.309e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 218; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDDownstreamGhost",manager,inputs,outputs,1.142e+02,2.274e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 219; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDUpstreamElectron",manager,inputs,outputs,9.380e+01,1.512e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 220; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDUpstreamMuon",manager,inputs,outputs,8.836e+01,1.362e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 221; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDUpstreamPion",manager,inputs,outputs,8.544e+01,1.254e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 222; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDUpstreamKaon",manager,inputs,outputs,9.684e+01,1.674e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 223; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDUpstreamProton",manager,inputs,outputs,8.600e+01,1.298e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 224; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ANNGPIDUpstreamGhost",manager,inputs,outputs,8.828e+01,1.363e+02); cfg.setDaughters(daughters); cfg.parent = "ANNGPIDSeq"; cfg.order = 225; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Hcal/Digits","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/SplitPhotons",0}; const char* outputs[] = {"/Event/Rec/ProtoP/Neutrals",0}; AlgConfig cfg("NeutralProtoPMaker",manager,inputs,outputs,2.428e+03,5.082e+03); cfg.setDaughters(daughters); cfg.parent = "NeutralProtoParticles"; cfg.order = 227; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/IT/Clusters","/Event/Raw/Muon/Coords","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/Velo/Clusters","/Event/Rec/Track/Best","/Event/Rec/Track/Muon","/Event/Rec/Vertex/Primary",0}; const char* outputs[] = {"/Event/Rec/Summary",0}; AlgConfig cfg("RecSummary",manager,inputs,outputs,1.090e+03,1.315e+03); cfg.setDaughters(daughters); cfg.parent = "RecoSUMMARYSeq"; cfg.order = 229; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("OverallEventProcTime",manager,inputs,outputs,4.056e+01,4.331e+01); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 232; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackEventProcTime",manager,inputs,outputs,3.108e+01,1.762e+01); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 233; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("VertexEventProcTime",manager,inputs,outputs,2.336e+01,8.795e+00); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 234; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichEventProcTime",manager,inputs,outputs,2.432e+01,9.005e+00); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 235; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("CaloEventProcTime",manager,inputs,outputs,2.156e+01,8.400e+00); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 236; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("MuonEventProcTime",manager,inputs,outputs,2.200e+01,9.968e+00); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 237; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("ProtoEventProcTime",manager,inputs,outputs,2.268e+01,8.479e+00); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 238; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("ProcStatAbortMoni",manager,inputs,outputs,6.168e+01,3.564e+01); cfg.setDaughters(daughters); cfg.parent = "MoniGENERALSeq"; cfg.order = 239; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Ecal/Digits",0}; const char* outputs[] = {0}; AlgConfig cfg("EcalDigitMon",manager,inputs,outputs,6.062e+02,1.446e+03); cfg.setDaughters(daughters); cfg.parent = "CaloDigitsMoni"; cfg.order = 242; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Hcal/Digits",0}; const char* outputs[] = {0}; AlgConfig cfg("HcalDigitMon",manager,inputs,outputs,6.350e+02,6.629e+02); cfg.setDaughters(daughters); cfg.parent = "CaloDigitsMoni"; cfg.order = 243; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Prs/Digits",0}; const char* outputs[] = {0}; AlgConfig cfg("PrsDigitMon",manager,inputs,outputs,4.098e+02,6.637e+02); cfg.setDaughters(daughters); cfg.parent = "CaloDigitsMoni"; cfg.order = 244; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Spd/Digits",0}; const char* outputs[] = {0}; AlgConfig cfg("SpdDigitMon",manager,inputs,outputs,2.187e+02,4.957e+02); cfg.setDaughters(daughters); cfg.parent = "CaloDigitsMoni"; cfg.order = 245; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Spd/Digits",0}; const char* outputs[] = {0}; AlgConfig cfg("SpdMon",manager,inputs,outputs,6.993e+02,1.798e+03); cfg.setDaughters(daughters); cfg.parent = "CaloDigitsMoni"; cfg.order = 246; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Ecal/Digits",0}; const char* outputs[] = {0}; AlgConfig cfg("EcalEFlowMon",manager,inputs,outputs,1.581e+02,2.200e+02); cfg.setDaughters(daughters); cfg.parent = "CaloEFlowMoni"; cfg.order = 248; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalClusters",0}; const char* outputs[] = {0}; AlgConfig cfg("EcalClusterMon",manager,inputs,outputs,2.298e+02,2.908e+02); cfg.setDaughters(daughters); cfg.parent = "CaloClustersMoni"; cfg.order = 250; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/Electrons",0}; const char* outputs[] = {0}; AlgConfig cfg("ElectronMon",manager,inputs,outputs,1.414e+02,2.034e+02); cfg.setDaughters(daughters); cfg.parent = "CaloHyposMoni"; cfg.order = 252; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/Photons",0}; const char* outputs[] = {0}; AlgConfig cfg("PhotonMon",manager,inputs,outputs,2.514e+02,4.606e+02); cfg.setDaughters(daughters); cfg.parent = "CaloHyposMoni"; cfg.order = 253; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/SplitPhotons",0}; const char* outputs[] = {0}; AlgConfig cfg("SplitPhotonMon",manager,inputs,outputs,7.512e+01,1.378e+01); cfg.setDaughters(daughters); cfg.parent = "CaloHyposMoni"; cfg.order = 254; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/MergedPi0s",0}; const char* outputs[] = {0}; AlgConfig cfg("MergedPi0Mon",manager,inputs,outputs,7.636e+01,2.079e+01); cfg.setDaughters(daughters); cfg.parent = "CaloHyposMoni"; cfg.order = 255; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Rec/Calo/Photons",0}; const char* outputs[] = {0}; AlgConfig cfg("ResolvedPi0Mon",manager,inputs,outputs,5.751e+02,1.024e+03); cfg.setDaughters(daughters); cfg.parent = "MoniCALOSeq"; cfg.order = 256; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ProtoElectronMon",manager,inputs,outputs,2.490e+02,3.675e+02); cfg.setDaughters(daughters); cfg.parent = "MoniCALOSeq"; cfg.order = 257; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalSplitClusters",0}; const char* outputs[] = {0}; AlgConfig cfg("PhotonMatchMon",manager,inputs,outputs,3.091e+02,3.799e+02); cfg.setDaughters(daughters); cfg.parent = "CaloPIDsMoni"; cfg.order = 259; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons",0}; const char* outputs[] = {0}; AlgConfig cfg("ElectronMatchMon",manager,inputs,outputs,2.728e+02,4.834e+02); cfg.setDaughters(daughters); cfg.parent = "CaloPIDsMoni"; cfg.order = 260; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/Photons",0}; const char* outputs[] = {0}; AlgConfig cfg("BremMatchMon",manager,inputs,outputs,1.456e+02,6.426e+01); cfg.setDaughters(daughters); cfg.parent = "CaloPIDsMoni"; cfg.order = 261; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("CaloEMuPIDMonUncut",manager,inputs,outputs,1.499e+02,1.734e+02); cfg.setDaughters(daughters); cfg.parent = "CaloPIDsMoni"; cfg.order = 262; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("CaloEMuPIDMonSoft",manager,inputs,outputs,8.312e+01,2.483e+01); cfg.setDaughters(daughters); cfg.parent = "CaloPIDsMoni"; cfg.order = 263; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("CaloEMuPIDMonHard",manager,inputs,outputs,7.680e+01,1.776e+01); cfg.setDaughters(daughters); cfg.parent = "CaloPIDsMoni"; cfg.order = 264; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("RichRawDataSize",manager,inputs,outputs,3.014e+03,2.898e+03); cfg.setDaughters(daughters); cfg.parent = "RichRawMoni"; cfg.order = 267; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Hlt/DecReports",0}; const char* outputs[] = {0}; AlgConfig cfg("RichDataSizeL0Filter",manager,inputs,outputs,9.056e+01,6.955e+01); cfg.setDaughters(daughters); cfg.parent = "RichRawDataSizeL0Seq"; cfg.order = 269; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {0}; AlgConfig cfg("RichRawDataSizeL0",manager,inputs,outputs,2.208e+03,1.791e+02); cfg.setDaughters(daughters); cfg.parent = "RichRawDataSizeL0Seq"; cfg.order = 270; cfg.level = 7; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichRawDataDBCheck",manager,inputs,outputs,9.620e+02,2.333e+03); cfg.setDaughters(daughters); cfg.parent = "RichRawMoni"; cfg.order = 271; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichHotPixels",manager,inputs,outputs,4.198e+02,8.934e+02); cfg.setDaughters(daughters); cfg.parent = "RichRawMoni"; cfg.order = 272; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN",0}; const char* outputs[] = {0}; AlgConfig cfg("RichDecodingErrors",manager,inputs,outputs,2.203e+03,1.114e+03); cfg.setDaughters(daughters); cfg.parent = "RichRawMoni"; cfg.order = 273; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichRecPixelQC",manager,inputs,outputs,4.034e+02,9.988e+02); cfg.setDaughters(daughters); cfg.parent = "RichPixelMoni"; cfg.order = 275; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichRecPixelClusters",manager,inputs,outputs,3.394e+02,9.012e+02); cfg.setDaughters(daughters); cfg.parent = "RichPixelMoni"; cfg.order = 276; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiLongTrkEff",manager,inputs,outputs,1.806e+02,5.069e+02); cfg.setDaughters(daughters); cfg.parent = "RichTrackMoni"; cfg.order = 278; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiForwardTrkEff",manager,inputs,outputs,7.704e+01,1.599e+02); cfg.setDaughters(daughters); cfg.parent = "RichTrackMoni"; cfg.order = 279; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiMatchTrkEff",manager,inputs,outputs,3.384e+01,4.311e+01); cfg.setDaughters(daughters); cfg.parent = "RichTrackMoni"; cfg.order = 280; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiKsTrackTrkEff",manager,inputs,outputs,4.396e+01,7.167e+01); cfg.setDaughters(daughters); cfg.parent = "RichTrackMoni"; cfg.order = 281; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiVeloTTTrkEff",manager,inputs,outputs,4.336e+01,6.991e+01); cfg.setDaughters(daughters); cfg.parent = "RichTrackMoni"; cfg.order = 282; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiSeedTrkEff",manager,inputs,outputs,4.904e+01,8.138e+01); cfg.setDaughters(daughters); cfg.parent = "RichTrackMoni"; cfg.order = 283; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResLong",manager,inputs,outputs,1.534e+03,4.960e+03); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoni"; cfg.order = 285; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResForward",manager,inputs,outputs,5.508e+02,1.653e+03); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoni"; cfg.order = 286; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResMatch",manager,inputs,outputs,4.584e+01,8.715e+01); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoni"; cfg.order = 287; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResKsTrack",manager,inputs,outputs,1.566e+02,4.354e+02); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoni"; cfg.order = 288; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResVeloTT",manager,inputs,outputs,4.816e+01,8.645e+01); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoni"; cfg.order = 289; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResSeed",manager,inputs,outputs,2.832e+02,8.471e+02); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoni"; cfg.order = 290; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResLongTight",manager,inputs,outputs,4.810e+02,1.599e+03); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoniTight"; cfg.order = 292; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResForwardTight",manager,inputs,outputs,4.387e+02,1.428e+03); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoniTight"; cfg.order = 293; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResMatchTight",manager,inputs,outputs,4.388e+01,8.310e+01); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoniTight"; cfg.order = 294; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResKsTrackTight",manager,inputs,outputs,1.150e+02,2.710e+02); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoniTight"; cfg.order = 295; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResVeloTTTight",manager,inputs,outputs,4.460e+01,8.383e+01); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoniTight"; cfg.order = 296; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Status",0}; const char* outputs[] = {0}; AlgConfig cfg("RiCKResSeedTight",manager,inputs,outputs,2.732e+02,8.382e+02); cfg.setDaughters(daughters); cfg.parent = "RichRecoMoniTight"; cfg.order = 297; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/PIDs","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiPIDMonLong2To100",manager,inputs,outputs,8.738e+02,3.119e+03); cfg.setDaughters(daughters); cfg.parent = "RichPIDMoni"; cfg.order = 299; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/PIDs","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiPIDMonLong2To10",manager,inputs,outputs,1.179e+02,2.117e+02); cfg.setDaughters(daughters); cfg.parent = "RichPIDMoni"; cfg.order = 300; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/PIDs","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiPIDMonLong10To70",manager,inputs,outputs,1.103e+02,1.770e+02); cfg.setDaughters(daughters); cfg.parent = "RichPIDMoni"; cfg.order = 301; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/PIDs","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("RiPIDMonLong70To100",manager,inputs,outputs,6.864e+01,7.244e+01); cfg.setDaughters(daughters); cfg.parent = "RichPIDMoni"; cfg.order = 302; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsAll",0}; const char* outputs[] = {0}; AlgConfig cfg("ENNRingMoniAll",manager,inputs,outputs,1.392e+02,4.358e+02); cfg.setDaughters(daughters); cfg.parent = "RichENNTracklessRingsMoni"; cfg.order = 304; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsBest",0}; const char* outputs[] = {0}; AlgConfig cfg("ENNRingMoniBest",manager,inputs,outputs,4.600e+01,7.446e+01); cfg.setDaughters(daughters); cfg.parent = "RichENNTracklessRingsMoni"; cfg.order = 305; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/ENN/Offline/RingsIsolated",0}; const char* outputs[] = {0}; AlgConfig cfg("ENNRingMoniIsolated",manager,inputs,outputs,3.956e+01,7.192e+01); cfg.setDaughters(daughters); cfg.parent = "RichENNTracklessRingsMoni"; cfg.order = 306; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichAlignMoniR1Gas",manager,inputs,outputs,6.288e+02,1.589e+03); cfg.setDaughters(daughters); cfg.parent = "RichMirrAlignMoni"; cfg.order = 308; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichAlignMoniR2Gas",manager,inputs,outputs,3.044e+02,8.558e+02); cfg.setDaughters(daughters); cfg.parent = "RichMirrAlignMoni"; cfg.order = 309; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("RichHPDIFBMoni",manager,inputs,outputs,1.465e+03,2.610e+03); cfg.setDaughters(daughters); cfg.parent = "RichHPDIonFeedback"; cfg.order = 311; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Muon/MuonPID","/Event/Rec/Track/Best","/Event/Rec/Track/Muon",0}; const char* outputs[] = {0}; AlgConfig cfg("MuonPIDMonitorDown",manager,inputs,outputs,2.211e+02,2.009e+02); cfg.setDaughters(daughters); cfg.parent = "MoniMUONSeq"; cfg.order = 313; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Muon/MuonPID","/Event/Rec/Track/Best","/Event/Rec/Track/Muon",0}; const char* outputs[] = {0}; AlgConfig cfg("MuonPIDMonitorLong",manager,inputs,outputs,3.913e+02,9.156e+02); cfg.setDaughters(daughters); cfg.parent = "MoniMUONSeq"; cfg.order = 314; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Muon",0}; const char* outputs[] = {0}; AlgConfig cfg("MuonTrackFitter",manager,inputs,outputs,6.071e+04,2.661e+05); cfg.setDaughters(daughters); cfg.parent = "MoniMUONSeq"; cfg.order = 315; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Muon/MuonPID",0}; const char* outputs[] = {0}; AlgConfig cfg("MuonTrackAligMonitor",manager,inputs,outputs,1.505e+03,4.451e+03); cfg.setDaughters(daughters); cfg.parent = "MoniMUONSeq"; cfg.order = 316; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/Raw/Muon/Coords","/Event/Rec/ProtoP/Charged","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("MuEffMonitor",manager,inputs,outputs,1.571e+03,2.867e+03); cfg.setDaughters(daughters); cfg.parent = "MoniMUONSeq"; cfg.order = 317; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Velo/Clusters",0}; const char* outputs[] = {0}; AlgConfig cfg("VeloClusterMonitor",manager,inputs,outputs,3.984e+02,6.725e+02); cfg.setDaughters(daughters); cfg.parent = "MoniVELOSeq"; cfg.order = 319; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Velo/Clusters","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("VeloTrackMonitor",manager,inputs,outputs,2.273e+03,6.137e+03); cfg.setDaughters(daughters); cfg.parent = "MoniVELOSeq"; cfg.order = 320; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best","/Event/Rec/Vertex/Primary",0}; const char* outputs[] = {0}; AlgConfig cfg("VeloIPResolutionMonitor",manager,inputs,outputs,4.675e+03,1.660e+04); cfg.setDaughters(daughters); cfg.parent = "MoniVELOSeq"; cfg.order = 321; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackMonitor",manager,inputs,outputs,4.468e+03,1.117e+04); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 323; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Muon",0}; const char* outputs[] = {"/Event/Rec/Vertex/DiMuon",0}; AlgConfig cfg("TrackDiMuonMonitor",manager,inputs,outputs,4.164e+02,8.051e+02); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 324; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best","/Event/Rec/Vertex/Primary",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackVertexMonitor",manager,inputs,outputs,3.516e+03,9.346e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 325; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Vertex/V0",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackV0Monitor",manager,inputs,outputs,2.362e+02,4.668e+02); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 326; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackFitMatchMonitor",manager,inputs,outputs,7.279e+02,1.902e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 327; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackAlignMonitor",manager,inputs,outputs,1.971e+03,5.225e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 328; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/IT/LiteClusters","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackITOverlapMonitor",manager,inputs,outputs,4.083e+03,1.142e+04); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 329; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackVeloOverlapMonitor",manager,inputs,outputs,8.582e+02,2.077e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 330; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/TT/Clusters","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TTTrackMonitor",manager,inputs,outputs,1.115e+03,2.873e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 331; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/IT/Clusters","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("ITTrackMonitor",manager,inputs,outputs,1.070e+03,2.842e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 332; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackPV2HalfAlignMonitor",manager,inputs,outputs,1.557e+03,4.637e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 333; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/EcalClusters","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackEcalMatchMonitor",manager,inputs,outputs,7.638e+02,1.669e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 334; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Spd/Digits","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackSpdMatchMonitor",manager,inputs,outputs,7.220e+02,1.702e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 335; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Prs/Digits","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackPrsMatchMonitor",manager,inputs,outputs,6.617e+02,1.752e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 336; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Raw/Muon/Coords","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackMuonMatchMonitor",manager,inputs,outputs,4.842e+02,1.124e+03); cfg.setDaughters(daughters); cfg.parent = "MoniTrSeq"; cfg.order = 337; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/DiMuon","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw",0}; const char* outputs[] = {0}; AlgConfig cfg("OTTimeMonitor",manager,inputs,outputs,5.722e+02,1.036e+03); cfg.setDaughters(daughters); cfg.parent = "MoniOTSeq"; cfg.order = 339; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("OTTrackMonitor",manager,inputs,outputs,2.702e+03,6.036e+03); cfg.setDaughters(daughters); cfg.parent = "MoniOTSeq"; cfg.order = 340; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("OTHitEfficiencyMonitor",manager,inputs,outputs,3.267e+03,7.323e+03); cfg.setDaughters(daughters); cfg.parent = "MoniOTSeq"; cfg.order = 341; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/Raw/TT/Clusters",0}; const char* outputs[] = {0}; AlgConfig cfg("TTClusterMonitor",manager,inputs,outputs,4.610e+02,5.827e+02); cfg.setDaughters(daughters); cfg.parent = "MoniSTSeq"; cfg.order = 343; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/Raw/IT/Clusters",0}; const char* outputs[] = {0}; AlgConfig cfg("ITClusterMonitor",manager,inputs,outputs,5.731e+02,1.383e+03); cfg.setDaughters(daughters); cfg.parent = "MoniSTSeq"; cfg.order = 344; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged","/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("ChargedProtoPMoni",manager,inputs,outputs,5.442e+02,1.270e+03); cfg.setDaughters(daughters); cfg.parent = "MoniPROTOSeq"; cfg.order = 346; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/Hlt/DecReports",0}; const char* outputs[] = {0}; AlgConfig cfg("HltRateMonitor",manager,inputs,outputs,4.299e+02,1.663e+03); cfg.setDaughters(daughters); cfg.parent = "MoniHltSeq"; cfg.order = 348; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Hlt/DecReports",0}; const char* outputs[] = {0}; AlgConfig cfg("HltCompositionMonitor",manager,inputs,outputs,2.952e+02,1.000e+03); cfg.setDaughters(daughters); cfg.parent = "MoniHltSeq"; cfg.order = 349; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/ODIN","/Event/Hlt/DecReports","/Event/Rec/Track/Velo",0}; const char* outputs[] = {0}; AlgConfig cfg("MuMonitor",manager,inputs,outputs,2.305e+02,1.449e+02); cfg.setDaughters(daughters); cfg.parent = "MoniHltSeq"; cfg.order = 350; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {0}; AlgConfig cfg("TrackToDST",manager,inputs,outputs,1.270e+02,2.277e+02); cfg.setDaughters(daughters); cfg.parent = "OutputDSTSeq"; cfg.order = 353; cfg.level = 4; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Best",0}; const char* outputs[] = {"/Event/pRec/Track/Best",0}; AlgConfig cfg("PackTracks",manager,inputs,outputs,5.537e+02,1.183e+03); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 355; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Rich/PIDs",0}; const char* outputs[] = {"/Event/pRec/Rich/PIDs",0}; AlgConfig cfg("PackRichPIDs",manager,inputs,outputs,4.257e+02,8.134e+02); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 356; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Muon/MuonPID",0}; const char* outputs[] = {"/Event/pRec/Muon/MuonPID",0}; AlgConfig cfg("PackMuonPIDs",manager,inputs,outputs,3.811e+02,7.560e+02); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 357; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/Photons",0}; const char* outputs[] = {"/Event/pRec/Calo/Photons",0}; AlgConfig cfg("PackPhotons",manager,inputs,outputs,3.937e+02,8.714e+02); cfg.setDaughters(daughters); cfg.parent = "CaloPacking"; cfg.order = 359; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/Electrons",0}; const char* outputs[] = {"/Event/pRec/Calo/Electrons",0}; AlgConfig cfg("PackElectrons",manager,inputs,outputs,1.088e+02,3.695e+01); cfg.setDaughters(daughters); cfg.parent = "CaloPacking"; cfg.order = 360; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/MergedPi0s",0}; const char* outputs[] = {"/Event/pRec/Calo/MergedPi0s",0}; AlgConfig cfg("PackMergedPi0s",manager,inputs,outputs,9.980e+01,2.595e+01); cfg.setDaughters(daughters); cfg.parent = "CaloPacking"; cfg.order = 361; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Calo/SplitPhotons",0}; const char* outputs[] = {"/Event/pRec/Calo/SplitPhotons",0}; AlgConfig cfg("PackSplitPhotons",manager,inputs,outputs,9.844e+01,2.919e+01); cfg.setDaughters(daughters); cfg.parent = "CaloPacking"; cfg.order = 362; cfg.level = 6; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {0}; AlgConfig cfg("ProtoParticlePIDClean",manager,inputs,outputs,1.329e+02,1.543e+02); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 363; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Charged",0}; const char* outputs[] = {"/Event/pRec/ProtoP/Charged",0}; AlgConfig cfg("PackChargedProtos",manager,inputs,outputs,2.487e+02,6.134e+02); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 364; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/ProtoP/Neutrals",0}; const char* outputs[] = {"/Event/pRec/ProtoP/Neutrals",0}; AlgConfig cfg("PackNeutralProtos",manager,inputs,outputs,1.770e+02,3.327e+02); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 365; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Vertex/Primary",0}; const char* outputs[] = {"/Event/pRec/Vertex/Primary",0}; AlgConfig cfg("PackRecVertex",manager,inputs,outputs,2.953e+02,6.560e+02); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 366; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Vertex/Weights",0}; const char* outputs[] = {"/Event/pRec/Vertex/Weights",0}; AlgConfig cfg("PackPVWeights",manager,inputs,outputs,5.262e+02,1.242e+03); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 367; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Vertex/V0",0}; const char* outputs[] = {"/Event/pRec/Vertex/V0",0}; AlgConfig cfg("PackTwoProngVertex",manager,inputs,outputs,2.096e+02,5.045e+02); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 368; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Track/Muon",0}; const char* outputs[] = {"/Event/pRec/Track/Muon",0}; AlgConfig cfg("PackMuonTracks",manager,inputs,outputs,1.220e+02,5.745e+01); cfg.setDaughters(daughters); cfg.parent = "PackDST"; cfg.order = 369; cfg.level = 5; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/Rec/Header","/Event/Rec/Status","/Event/Rec/Summary","/Event/pRec/Calo/Electrons","/Event/pRec/Calo/MergedPi0s","/Event/pRec/Calo/Photons","/Event/pRec/Calo/SplitPhotons","/Event/pRec/Muon/MuonPID","/Event/pRec/ProtoP/Charged","/Event/pRec/ProtoP/Neutrals","/Event/pRec/Rich/PIDs","/Event/pRec/Track/Best","/Event/pRec/Track/Muon","/Event/pRec/Vertex/Primary","/Event/pRec/Vertex/V0","/Event/pRec/Vertex/Weights",0}; const char* outputs[] = {0}; AlgConfig cfg("DstWriter",manager,inputs,outputs,4.526e+04,2.228e+05); cfg.setDaughters(daughters); cfg.parent = "Framework"; cfg.order = 370; cfg.level = 1; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; // Input data estimated const char* inputs[] = {"/Event/DAQ/Status","/Event/Hlt/DecReports","/Event/Hlt/LumiSummary","/Event/Link/Rec/Track/BestClones","/Event/Raw/Ecal/Adcs","/Event/Raw/Ecal/Digits","/Event/Raw/Hcal/Adcs","/Event/Raw/Hcal/Digits","/Event/Raw/IT/Clusters","/Event/Raw/IT/LiteClusters","/Event/Raw/Muon/Coords","/Event/Raw/Prs/Adcs","/Event/Raw/Prs/Digits","/Event/Raw/Spd/Digits","/Event/Raw/TT/Clusters","/Event/Raw/TT/LiteClusters","/Event/Raw/Velo/Clusters","/Event/Raw/Velo/LiteClusters","/Event/Rec/Calo/BremChi2","/Event/Rec/Calo/BremMatch","/Event/Rec/Calo/BremPIDe","/Event/Rec/Calo/ClusChi2","/Event/Rec/Calo/ClusterMatch","/Event/Rec/Calo/EcalChi2","/Event/Rec/Calo/EcalClusters","/Event/Rec/Calo/EcalE","/Event/Rec/Calo/EcalPIDe","/Event/Rec/Calo/EcalPIDmu","/Event/Rec/Calo/EcalSplitClusters","/Event/Rec/Calo/ElectronMatch","/Event/Rec/Calo/Electrons","/Event/Rec/Calo/HcalE","/Event/Rec/Calo/HcalPIDe","/Event/Rec/Calo/HcalPIDmu","/Event/Rec/Calo/InAccBrem","/Event/Rec/Calo/InAccEcal","/Event/Rec/Calo/InAccHcal","/Event/Rec/Calo/InAccPrs","/Event/Rec/Calo/InAccSpd","/Event/Rec/Calo/MergedID","/Event/Rec/Calo/MergedPi0s","/Event/Rec/Calo/PhotonFromMergedID","/Event/Rec/Calo/PhotonID","/Event/Rec/Calo/Photons","/Event/Rec/Calo/PrsE","/Event/Rec/Calo/PrsPIDe","/Event/Rec/Calo/SpdE","/Event/Rec/Calo/SplitPhotons","/Event/Rec/Header","/Event/Rec/IT/Summary","/Event/Rec/Muon/MuonPID","/Event/Rec/ProtoP/Charged","/Event/Rec/ProtoP/Neutrals","/Event/Rec/Rich/ENN/Offline/RingsAll","/Event/Rec/Rich/ENN/Offline/RingsBest","/Event/Rec/Rich/ENN/Offline/RingsIsolated","/Event/Rec/Rich/GlobalPID/Offline/PIDs","/Event/Rec/Rich/GlobalPID/Offline/Tracks","/Event/Rec/Rich/PIDs","/Event/Rec/Rich/RecoEvent/Offline/Photons","/Event/Rec/Rich/RecoEvent/Offline/Pixels","/Event/Rec/Rich/RecoEvent/Offline/SegmentHypoRings","/Event/Rec/Rich/RecoEvent/Offline/Segments","/Event/Rec/Rich/RecoEvent/Offline/Status","/Event/Rec/Rich/RecoEvent/Offline/Tracks","/Event/Rec/Status","/Event/Rec/Summary","/Event/Rec/TT/Summary","/Event/Rec/Track/AllBest","/Event/Rec/Track/Best","/Event/Rec/Track/Downstream","/Event/Rec/Track/Forward","/Event/Rec/Track/Match","/Event/Rec/Track/Muon","/Event/Rec/Track/PreparedVelo","/Event/Rec/Track/Seed","/Event/Rec/Track/Velo","/Event/Rec/Track/VeloTT","/Event/Rec/Vertex/DiMuon","/Event/Rec/Vertex/Primary","/Event/Rec/Vertex/V0","/Event/Rec/Vertex/Weights","/Event/Trig/L0/EcalRaw","/Event/Trig/L0/HcalRaw","/Event/Trig/L0/PrsRaw","/Event/Trig/L0/SpdRaw","/Event/pRec/Calo/Electrons","/Event/pRec/Calo/MergedPi0s","/Event/pRec/Calo/Photons","/Event/pRec/Calo/SplitPhotons","/Event/pRec/Muon/MuonPID","/Event/pRec/ProtoP/Charged","/Event/pRec/ProtoP/Neutrals","/Event/pRec/Rich/PIDs","/Event/pRec/Track/Best","/Event/pRec/Track/Muon","/Event/pRec/Vertex/Primary","/Event/pRec/Vertex/V0","/Event/pRec/Vertex/Weights",0}; const char* outputs[] = {0}; AlgConfig cfg("FSROutputStreamDstWriter",manager,inputs,outputs,1.583e+01,3.387e+00); cfg.setDaughters(daughters); cfg.parent = "Framework"; cfg.order = 371; cfg.level = 1; cfg.flags = 0x0; cfg.type = "Algorithm"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); } { const char* daughters[] = {0}; const char* inputs[] = {"/Event/DAQ/RawEvent",0}; const char* outputs[] = {"/Event/DAQ/ODIN",0}; AlgConfig cfg("Framework",manager,inputs,outputs,0.000e+00,0.000e+00); cfg.setDaughters(daughters); cfg.parent = "Framework"; cfg.order = 372; cfg.level = 0; cfg.flags = 0x2000000; cfg.type = "Framework"; AlgEntry* a = new AlgEntry(multiplicity,cfg); a->initialize(); }
db4603ec09342bb0df46bfe1d3c25ecb18702f94
4e80701d5bce0bb33d5a563598bb8ccce0aad864
/Beginner/Nível 4/URI 2163.cpp
ad6bcc81182205e01ad3697f80c8e627aba7c5a3
[]
no_license
thiagohfo/URIOnlineJudge
49ce3a3ddc14ada0110b4183164cc16bc5b1e506
983beb282050e6e1a8c421acb39dbd6976d1f997
refs/heads/main
2022-12-08T06:03:38.677018
2022-11-28T14:36:29
2022-11-28T14:36:29
174,578,594
0
0
null
null
null
null
UTF-8
C++
false
false
1,015
cpp
URI 2163.cpp
// // URI 2163.cpp // Pratica // // Created by Thiago Henrique on 14/11/17. // Copyright © 2017 Thiago Henrique. All rights reserved. // #include <stdio.h> #include <iostream> using namespace std; int main(){ int Linha, Coluna, RLinha = 0, RColuna = 0; cin >> Linha >> Coluna; int terreno[Linha][Coluna]; for(int i = 0; i < Linha; i++){ for(int j = 0; j < Coluna; j++){ cin >> terreno[i][j]; } } for(int i = 1; i < Linha - 1; i++){ for(int j = 1; j < Coluna - 1; j++){ if(terreno[i - 1][j] == 7 && terreno[i + 1][j] == 7 && terreno[i][j + 1] == 7 && terreno[i][j - 1] == 7 && terreno[i - 1][j - 1] == 7 && terreno[i - 1][j + 1] == 7 && terreno[i + 1][j - 1] == 7 && terreno[i + 1][j + 1] == 7 && terreno[i][j] == 42){ RLinha = i + 1; RColuna = j + 1; } } } cout << RLinha << " " << RColuna << endl; return 0; }
f8dd9e77d8137dae8c3290bd26a539eccaf4bbd7
4192435e7b4c1deb7ed4bfc5c51c28d24fc5f4d9
/11220.cpp
0329e1c4d7b0fe554a66d934c7b457a6637e5059
[]
no_license
MDNoorUddin/UVA-Solutions
b1640d4ee862f161684fe43cf9a37b080e8e841c
b68a2dbd9cf175775a9ec20a1394ec11a1f8f07b
refs/heads/master
2021-08-08T10:27:51.272631
2020-03-09T19:18:17
2020-03-09T19:18:17
100,978,184
5
6
null
null
null
null
UTF-8
C++
false
false
927
cpp
11220.cpp
#include <iostream> #include<stdio.h> #include<math.h> #include<algorithm> #include<stack> #include<queue> #include<set> #include<map> #include<vector> #include<math.h> #include<string> #include<list> #include<bits/stdc++.h> using namespace std; #define ll long long #define input scanf #define output printf #define Loop while #define echo cout #define ret return #define MAX 999999999999999999 #define MIN 0 #define PI acos(-1) #define e 2.718281828459 int main(int argc, char** argv) { //freopen("c.txt","w",stdout); int t; cin>>t; cin.ignore(); int I=1; string str; getline(cin,str); while(t--) { if(I!=1)cout<<endl; printf("Case #%d:\n",I++); while(true) { getline(cin,str); if(str=="")break; int count=0; stringstream f(str); string temp; while(f>>temp) { if(temp.size()>=count+1) { cout<<temp[count];count++; } } cout<<endl; } } return 0; }
3da9aab2ca166ebef17abd9abcaa04a605c6cb29
c8f0b0f490dee2859f2912fd4ed4389d2d3ba2c1
/Assignments/Assignment4/EKF_UKF/codegen/lib/EKF_predict/examples/main.cpp
87555ad6a6db3928738842491759de1bd03a7962
[]
no_license
deepakgangwar/EE698G
647946e6c32a16ce0d2ebe1292b725288033caa0
d320caac3bf863bcfdf077f6eac5ccdff67a0951
refs/heads/master
2021-03-19T16:22:09.955965
2018-02-07T08:57:45
2018-02-07T08:57:45
81,822,755
1
0
null
null
null
null
UTF-8
C++
false
false
7,126
cpp
main.cpp
// // File: main.cpp // // MATLAB Coder version : 2.8 // C/C++ source code generated on : 02-Apr-2017 18:48:16 // //*********************************************************************** // This automatically generated example C main file shows how to call // entry-point functions that MATLAB Coder generated. You must customize // this file for your application. Do not modify this file directly. // Instead, make a copy of this file, modify it, and integrate it into // your development environment. // // This file initializes entry-point function arguments to a default // size and value before calling the entry-point functions. It does // not store or use any values returned from the entry-point functions. // If necessary, it does pre-allocate memory for returned values. // You can use this file as a starting point for a main function that // you can deploy in your application. // // After you copy the file, and before you deploy it, you must make the // following changes: // * For variable-size function arguments, change the example sizes to // the sizes that your application requires. // * Change the example values of function arguments to the values that // your application requires. // * If the entry-point functions return values, store these values or // otherwise use them as required by your application. // //*********************************************************************** // Include Files #include "rt_nonfinite.h" #include "EKF_predict.h" #include "EKF_update.h" #include "main.h" #include "EKF_predict_terminate.h" #include "EKF_predict_initialize.h" // Function Declarations static void argInit_1xd2_real_T(double result_data[], int result_size[2]); static void argInit_2x20_real_T(double result[40]); static void argInit_2x2_real_T(double result[4]); static void argInit_2xd2_real_T(double result_data[], int result_size[2]); static void argInit_3x1_real_T(double result[3]); static void argInit_3x3_real_T(double result[9]); static double argInit_real_T(); static void main_EKF_predict(); static void main_EKF_update(); // Function Definitions // // Arguments : double result_data[] // int result_size[2] // Return Type : void // static void argInit_1xd2_real_T(double result_data[], int result_size[2]) { int b_j1; // Set the size of the array. // Change this size to the value that the application requires. result_size[0] = 1; result_size[1] = 2; // Loop over the array to initialize each element. for (b_j1 = 0; b_j1 < 2; b_j1++) { // Set the value of the array element. // Change this value to the value that the application requires. result_data[b_j1] = argInit_real_T(); } } // // Arguments : double result[40] // Return Type : void // static void argInit_2x20_real_T(double result[40]) { int b_j0; int b_j1; // Loop over the array to initialize each element. for (b_j0 = 0; b_j0 < 2; b_j0++) { for (b_j1 = 0; b_j1 < 20; b_j1++) { // Set the value of the array element. // Change this value to the value that the application requires. result[b_j0 + (b_j1 << 1)] = argInit_real_T(); } } } // // Arguments : double result[4] // Return Type : void // static void argInit_2x2_real_T(double result[4]) { int b_j0; int b_j1; // Loop over the array to initialize each element. for (b_j0 = 0; b_j0 < 2; b_j0++) { for (b_j1 = 0; b_j1 < 2; b_j1++) { // Set the value of the array element. // Change this value to the value that the application requires. result[b_j0 + (b_j1 << 1)] = argInit_real_T(); } } } // // Arguments : double result_data[] // int result_size[2] // Return Type : void // static void argInit_2xd2_real_T(double result_data[], int result_size[2]) { int b_j0; int b_j1; // Set the size of the array. // Change this size to the value that the application requires. result_size[0] = 2; result_size[1] = 2; // Loop over the array to initialize each element. for (b_j0 = 0; b_j0 < 2; b_j0++) { for (b_j1 = 0; b_j1 < 2; b_j1++) { // Set the value of the array element. // Change this value to the value that the application requires. result_data[b_j0 + 2 * b_j1] = argInit_real_T(); } } } // // Arguments : double result[3] // Return Type : void // static void argInit_3x1_real_T(double result[3]) { int b_j0; // Loop over the array to initialize each element. for (b_j0 = 0; b_j0 < 3; b_j0++) { // Set the value of the array element. // Change this value to the value that the application requires. result[b_j0] = argInit_real_T(); } } // // Arguments : double result[9] // Return Type : void // static void argInit_3x3_real_T(double result[9]) { int b_j0; int b_j1; // Loop over the array to initialize each element. for (b_j0 = 0; b_j0 < 3; b_j0++) { for (b_j1 = 0; b_j1 < 3; b_j1++) { // Set the value of the array element. // Change this value to the value that the application requires. result[b_j0 + 3 * b_j1] = argInit_real_T(); } } } // // Arguments : void // Return Type : double // static double argInit_real_T() { return 0.0; } // // Arguments : void // Return Type : void // static void main_EKF_predict() { double x[3]; double P[9]; double dv0[4]; // Initialize function 'EKF_predict' input arguments. // Initialize function input argument 'x'. argInit_3x1_real_T(x); // Initialize function input argument 'P'. argInit_3x3_real_T(P); // Initialize function input argument 'Q'. // Call the entry-point 'EKF_predict'. argInit_2x2_real_T(dv0); EKF_predict(x, P, argInit_real_T(), argInit_real_T(), dv0, argInit_real_T()); } // // Arguments : void // Return Type : void // static void main_EKF_update() { double x[3]; double P[9]; int z_size[2]; double z_data[4]; double R[4]; int idf_size[2]; double idf_data[2]; double dv1[40]; // Initialize function 'EKF_update' input arguments. // Initialize function input argument 'x'. argInit_3x1_real_T(x); // Initialize function input argument 'P'. argInit_3x3_real_T(P); // Initialize function input argument 'z'. argInit_2xd2_real_T(z_data, z_size); // Initialize function input argument 'R'. argInit_2x2_real_T(R); // Initialize function input argument 'idf'. argInit_1xd2_real_T(idf_data, idf_size); // Initialize function input argument 'lm'. // Call the entry-point 'EKF_update'. argInit_2x20_real_T(dv1); EKF_update(x, P, z_data, z_size, R, idf_data, idf_size, dv1); } // // Arguments : int argc // const char * const argv[] // Return Type : int // int main(int, const char * const []) { // Initialize the application. // You do not need to do this more than one time. EKF_predict_initialize(); // Invoke the entry-point functions. // You can call entry-point functions multiple times. main_EKF_predict(); main_EKF_update(); // Terminate the application. // You do not need to do this more than one time. EKF_predict_terminate(); return 0; } // // File trailer for main.cpp // // [EOF] //
9126bdb94744de2c6e4c57f13a5e490d98db47b1
62a9961bfabc1955c7eac0acb4a35bd6dca1d156
/HandyDevices/Xtruder/Heater_fw/src/beep.cpp
864e198d6b9cce7466e6aaa65f9b64ce0562c490
[]
no_license
jordoin/nute
712ffe2aaf57ac41e44004613bc727a35ad123e0
830adcd3bd5386d03d8d49ab422f5f568643adb5
refs/heads/master
2021-01-17T07:00:40.751579
2015-03-28T20:05:30
2015-03-28T20:05:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,566
cpp
beep.cpp
/* * beep.cpp * * Created on: 25.01.2012 * Author: kreyl */ #include "beep.h" #include "stm32f10x_rcc.h" #include "stm32f10x_tim.h" Beep_t Beep; void Beep_t::Init() { klGpioSetupByN(GPIOB, 0, GPIO_Mode_AF_PP); // ==== Timer ==== RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE); // Clock // ==== Timebase and general ==== BEEP_TIM->CR1 = 0x01; // Enable timer, set clk division to 0, AutoReload not buffered BEEP_TIM->CR2 = 0; BEEP_TIM->ARR = BEEP_TOP_VALUE; // Autoreload register SetFreqHz(1603); // ==== Output ==== BEEP_TIM->CCMR1 = 0; // Outputs disabled BEEP_TIM->CCMR2 = 0x0060; // Ch3 is output, PWM mode 1 BEEP_TIM->CCER = 0x0100; // Ch3 output enabled, active high } void Beep_t::SetFreqHz(uint32_t AFreq) { uint32_t FPrescaler = SystemCoreClock / (BEEP_TOP_VALUE * AFreq); if (FPrescaler != 0) FPrescaler--; // do not decrease in case of high freq BEEP_TIM->PSC = (uint16_t)FPrescaler; } void Beep_t::Task() { if(ICounter != 0) { if(IsOn) { if(Delay.Elapsed(&ITimer, BEEP_ON_LEN)) { Off(); ICounter--; } // if delay } // if on else { if(Delay.Elapsed(&ITimer, BEEP_OFF_LEN)) { On(); } // if delay } } // if ICounter } void Beep_t::Squeak(uint32_t ANumber, uint8_t AVolume) { ICounter = ANumber; IVolume = AVolume; On(); Delay.Reset(&ITimer); }
96d888da3b753d1ed6e975402e126f8190f1583d
e1600ea3199bd1273502ae23ece799cc9e39ccfe
/Code/ForceField/MMFF/DistanceConstraint.h
23d0730b89e87a882d356ed13a55730acb5d4318
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
biolearning-stadius/rdkit
5fb9dc7275b1e9fd2f7286d34391263b9c5ac717
650141ece7b68f054ed14813e1585436ad57d3df
refs/heads/master
2022-11-19T12:43:43.999264
2020-07-19T18:17:26
2020-07-19T18:17:26
272,671,014
6
1
BSD-3-Clause
2020-06-16T09:51:19
2020-06-16T09:51:18
null
UTF-8
C++
false
false
2,053
h
DistanceConstraint.h
// // Copyright (C) 2013 Paolo Tosco // // Copyright (C) 2004-2006 Rational Discovery LLC // // @@ All Rights Reserved @@ // This file is part of the RDKit. // The contents are covered by the terms of the BSD license // which is included in the file license.txt, found at the root // of the RDKit source tree. // #include <RDGeneral/export.h> #ifndef __RD_MMFFDISTANCECONSTRAINT_H__ #define __RD_MMFFDISTANCECONSTRAINT_H__ #include <iostream> #include <ForceField/Contrib.h> namespace ForceFields { namespace MMFF { //! A distance range constraint modelled after a BondStretchContrib class RDKIT_FORCEFIELD_EXPORT DistanceConstraintContrib : public ForceFieldContrib { public: DistanceConstraintContrib() {}; //! Constructor /*! \param owner pointer to the owning ForceField \param idx1 index of end1 in the ForceField's positions \param idx2 index of end2 in the ForceField's positions \param minLen minimum distance \param maxLen maximum distance \param forceConst force Constant */ DistanceConstraintContrib(ForceField *owner, unsigned int idx1, unsigned int idx2, double minLen, double maxLen, double forceConst); DistanceConstraintContrib(ForceField *owner, unsigned int idx1, unsigned int idx2, bool relative, double minLen, double maxLen, double forceConst); ~DistanceConstraintContrib() { // std::cerr << " ==== Destroy constraint " << d_end1Idx << " " << d_end2Idx // << std::endl; } double getEnergy(double *pos) const; void getGrad(double *pos, double *grad) const; virtual DistanceConstraintContrib *copy() const { return new DistanceConstraintContrib(*this); }; private: int d_end1Idx{-1}, d_end2Idx{-1}; //!< indices of end points double d_minLen, d_maxLen; //!< rest length of the bond double d_forceConstant; //!< force constant of the bond }; } // namespace MMFF } // namespace ForceFields #endif
3f73290c3c071c289ab0d2c3402cc103fbd2242d
c473fa439a497f20a2f5d22c688f4f93d648c112
/Game Loop/Game Loop/src/loops/A_SimpleLoop.cpp
91e8cfd7dc8f24aae98b68beed92dc1823340dc7
[]
no_license
Informatics-Blackboard/Game-Engine-Basics
6bb5f5eb8ae259636e1720a8d2591a5adf126fad
72a4f3c0ca589873132e1b022efc118dd6af803e
refs/heads/master
2022-12-06T16:53:27.055945
2020-08-14T23:04:41
2020-08-14T23:04:41
286,459,822
0
0
null
null
null
null
UTF-8
C++
false
false
335
cpp
A_SimpleLoop.cpp
#include "A_SimpleLoop.h" // Update & FPS dependent on machine void Run_SimpleLoop(Game* game) { while (game->IsRunning()) { game->UpdateGame(TIME_UNIT(1)); // Update with an arbitraty constant amount. game->DisplayGame(); // Update & Display are called as fast as possible. } } /* - Completely dependent on machine */
b3b26baeccd762b6afb618bac8a6878a7c88ebd8
ca1a4afe7d0eee8f5f687383dd1b78813b908171
/source/lib_vm/thread_error.h
e2ace28fc46fe4ab5cfa0f0013f2c29887a591e0
[]
no_license
bit-hack/nano-script
21c03e7d12de444192efbdce7edddd5b4f35cbe5
bc6550a6474ec1c185a72cbb7309c814834c7dd1
refs/heads/master
2022-11-07T14:10:56.760247
2020-06-18T23:01:38
2020-06-18T23:01:38
44,958,693
3
0
null
null
null
null
UTF-8
C++
false
false
604
h
thread_error.h
#pragma once namespace nano { // XXX: should add a PC address for a thread error enum class thread_error_t { e_success = 0, e_max_cycle_count, e_bad_prepare, e_bad_getv, e_bad_setv, e_bad_num_args, e_bad_syscall, e_bad_opcode, e_bad_set_global, e_bad_get_global, e_bad_pop, e_bad_divide_by_zero, e_stack_overflow, e_stack_underflow, e_bad_globals_size, e_bad_array_bounds, e_bad_array_index, e_bad_array_object, e_bad_type_operation, e_bad_argument, e_bad_member_access, }; const char *get_thread_error(const nano::thread_error_t &err); } // namespace nano
101c7a4c38225f39cc5ae5755065d43de56a2b61
01bcef56ade123623725ca78d233ac8653a91ece
/utils/vpc/vpc/solutiongenerator_win32.cpp
0f24ea4784fa4696146c038cb3f5eaa6dca973f7
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SwagSoftware/Kisak-Strike
1085ba3c6003e622dac5ebc0c9424cb16ef58467
4c2fdc31432b4f5b911546c8c0d499a9cff68a85
refs/heads/master
2023-09-01T02:06:59.187775
2022-09-05T00:51:46
2022-09-05T00:51:46
266,676,410
921
123
null
2022-10-01T16:26:41
2020-05-25T03:41:35
C++
UTF-8
C++
false
false
21,864
cpp
solutiongenerator_win32.cpp
//===================== Copyright (c) Valve Corporation. All Rights Reserved. ====================== // // Purpose: // //================================================================================================== #include "vpc.h" #include "dependencies.h" #include "tier1/checksum_md5.h" struct SolutionFolderData_t { CUtlString strAbsPath; CUtlString strFolderName; CUtlString strGUID; CUtlString strParentGUID; CUtlString strSearchPattern; CUtlVector< CUtlString > files; }; class CSolutionGenerator_Win32 : public IBaseSolutionGenerator { public: void GetVCPROJSolutionGUID( const char *szProjectExtension, char (&szSolutionGUID)[256] ) { #if defined( PLATFORM_WINDOWS ) HKEY hKey; int firstVer = 8; const int lastVer = 14; // Handle up to VS 14, AKA VS 2015 if ( g_pVPC->Is2010() ) { firstVer = 10; } // Handle both VisualStudio and VCExpress (used by some SourceSDK customers) const char* productName[] = { "VisualStudio", "VCExpress", }; for ( int nLocationIter = 0; nLocationIter < 2; ++nLocationIter ) //for some reason I don't care to investigate there are more keys available at HKEY_CURRENT_USER\\Software\\Microsoft\\%s\\%d.0_Config\\Projects (androidproj support) { for ( int vsVer = firstVer; vsVer <= lastVer; ++vsVer ) { for ( int productNumber = 0; productNumber < ARRAYSIZE(productName); ++productNumber ) { LONG ret; if ( nLocationIter == 0 ) { #if defined( _WIN64 ) #define WOW6432NODESTR "Software\\Wow6432Node" #else #define WOW6432NODESTR "Software" #endif ret = RegOpenKeyEx( HKEY_LOCAL_MACHINE, CFmtStrN<1024>( WOW6432NODESTR "\\Microsoft\\%s\\%d.0\\Projects", productName[ productNumber ], vsVer ).Get(), 0, KEY_READ, &hKey ); } else if ( nLocationIter == 1 ) { ret = RegOpenKeyEx( HKEY_CURRENT_USER, CFmtStrN<1024>( "Software\\Microsoft\\%s\\%d.0_Config\\Projects", productName[ productNumber ], vsVer ).Get(), 0, KEY_READ, &hKey ); } else { UNREACHABLE(); } if ( ret != ERROR_SUCCESS ) continue; int nEnumKey = 0; do { char szKeyName[MAX_FIXED_PATH]; DWORD dwKeyNameSize = sizeof( szKeyName ); ret = RegEnumKeyEx( hKey, nEnumKey++, szKeyName, &dwKeyNameSize, NULL, NULL, NULL, NULL ); if ( ret == ERROR_NO_MORE_ITEMS ) break; HKEY hSubKey; ret = RegOpenKeyEx( hKey, szKeyName, 0, KEY_READ, &hSubKey ); if ( ret == ERROR_SUCCESS ) { DWORD dwType; char ext[MAX_BASE_FILENAME]; DWORD dwExtLen = sizeof( ext ); ret = RegQueryValueEx( hSubKey, "DefaultProjectExtension", NULL, &dwType, (BYTE*)ext, &dwExtLen ); RegCloseKey( hSubKey ); // VS 2012 and beyond has the DefaultProjectExtension as vcxproj instead of vcproj if ( (ret == ERROR_SUCCESS) && (dwType == REG_SZ) && V_stricmp_fast( ext, szProjectExtension ) == 0 ) { V_strncpy( szSolutionGUID, szKeyName, ARRAYSIZE(szSolutionGUID) ); RegCloseKey( hKey ); return; } } } while( true ); RegCloseKey( hKey ); } } } #endif g_pVPC->VPCError( "Unable to find RegKey for .%s files in solutions.", szProjectExtension ); } const char *UpdateProjectFilename( const char *pProjectFilename, CUtlPathStringHolder *pUpdateBuffer ) { const char *pExt = V_GetFileExtension( pProjectFilename ); // We may be generating a makefile wrapper solution, // in which case we need to look at the wrapper // project instead of the base project. const char *pProjectExt = "vcproj"; if ( g_pVPC->Is2010() ) { pProjectExt = "vcxproj"; } if ( pExt == NULL || V_stricmp_fast( pExt, "mak" ) == 0 ) { pUpdateBuffer->Set( pProjectFilename, ".", pProjectExt ); return pUpdateBuffer->Get(); } return pProjectFilename; } virtual void GenerateSolutionFile( const char *pSolutionFilename, CUtlVector<CDependency_Project*> &projects ) { // Default extension. CUtlPathStringHolder tmpSolutionFilename; if ( !V_GetFileExtension( pSolutionFilename ) ) { tmpSolutionFilename.Set( pSolutionFilename, ".sln" ); pSolutionFilename = tmpSolutionFilename.Get(); } CUtlVector<CUtlString> allProjectPlatforms; { CUtlVector<CUtlString> platformCollect; for ( int i = 0; i < projects.Count(); i++ ) { //collect all the platforms supported by this project platformCollect.RemoveAll(); projects[i]->m_pProjectGenerator->EnumerateSupportedVPCTargetPlatforms( platformCollect ); //add each supported platform to the final list if it's not already in there for ( int j = 0; j < platformCollect.Count(); ++j ) { if ( !allProjectPlatforms.IsValidIndex( allProjectPlatforms.Find( platformCollect[j] ) ) ) { allProjectPlatforms.AddToTail( platformCollect[j] ); } } } } g_pVPC->VPCStatus( true, "\nWriting solution file %s.", pSolutionFilename ); // Write the file. FILE *fp = fopen( pSolutionFilename, "wt" ); if ( !fp ) g_pVPC->VPCError( "Can't open %s for writing.", pSolutionFilename ); if ( g_pVPC->Is2015() ) { fprintf( fp, "\xef\xbb\xbf\nMicrosoft Visual Studio Solution File, Format Version 14.00\n" ); fprintf( fp, "# Visual Studio 2015\n" ); } else if ( g_pVPC->Is2013() ) { fprintf( fp, "\xef\xbb\xbf\nMicrosoft Visual Studio Solution File, Format Version 12.00\n" ); // Format didn't change from VS 2012 to VS 2013 fprintf( fp, "# Visual Studio 2013\n" ); } else if ( g_pVPC->Is2012() ) { fprintf( fp, "\xef\xbb\xbf\nMicrosoft Visual Studio Solution File, Format Version 12.00\n" ); fprintf( fp, "# Visual Studio 2012\n" ); } else if ( g_pVPC->Is2010() ) { fprintf( fp, "\xef\xbb\xbf\nMicrosoft Visual Studio Solution File, Format Version 11.00\n" ); fprintf( fp, "# Visual Studio 2010\n" ); } else { fprintf( fp, "\xef\xbb\xbf\nMicrosoft Visual Studio Solution File, Format Version 9.00\n" ); fprintf( fp, "# Visual Studio 2005\n" ); } fprintf( fp, "#\n" ); fprintf( fp, "# Automatically generated solution:\n" ); fprintf( fp, "# devtools\\bin\\vpc " ); #if defined( PLATFORM_WINDOWS ) for ( int k = 1; k < __argc; ++ k ) fprintf( fp, "%s ", __argv[k] ); #endif fprintf( fp, "\n" ); fprintf( fp, "#\n" ); fprintf( fp, "#\n" ); if ( !g_pVPC->Is2010() ) { // if /slnItems <filename> is passed on the command line, build a Solution Items project const char *pSolutionItemsFilename = g_pVPC->GetSolutionItemsFilename(); if ( pSolutionItemsFilename[0] != '\0' ) { fprintf( fp, "Project(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Solution Items\", \"Solution Items\", \"{AAAAAAAA-8B4A-11D0-8D11-90A07D6D6F7D}\"\n" ); fprintf( fp, "\tProjectSection(SolutionItems) = preProject\n" ); WriteSolutionItems( fp ); fprintf( fp, "\tEndProjectSection\n" ); fprintf( fp, "EndProject\n" ); } } //Write the data for all the solution folders CUtlVector< SolutionFolderData_t > solutionFolderData; WriteSolutionFolders( fp, solutionFolderData ); for ( int i=0; i < projects.Count(); i++ ) { CDependency_Project *pCurProject = projects[i]; char szBasePath[MAX_PATH]; V_strncpy( szBasePath, pCurProject->m_Filename, ARRAYSIZE( szBasePath ) ); V_StripFilename( szBasePath ); char szOutputFilePath[MAX_PATH]; V_ComposeFileName( szBasePath, pCurProject->GetProjectFileName(), szOutputFilePath, ARRAYSIZE( szOutputFilePath ) ); // Get a relative filename for the vcproj file. CUtlPathStringHolder updatedFilename; const char *pFullProjectFilename = UpdateProjectFilename( szOutputFilePath, &updatedFilename ); char szRelativeFilename[MAX_FIXED_PATH]; if ( !V_MakeRelativePath( pFullProjectFilename, g_pVPC->GetSourcePath(), szRelativeFilename, sizeof( szRelativeFilename ) ) ) g_pVPC->VPCError( "Can't make a relative path (to the base source directory) for %s.", pFullProjectFilename ); char szSolutionGUID[256]; GetVCPROJSolutionGUID( V_GetFileExtension( szRelativeFilename ), szSolutionGUID ); if ( g_pVPC->Is2010() ) { char *pLastDot; char pProjectName[MAX_BASE_FILENAME]; // It looks like Incredibuild 3.6 looks to build projects using the full project name // with _x360 or _win64 attached to the end. Basically, the full project filename with // the path and .vcxproj extension removed. Sys_StripPath( pFullProjectFilename, pProjectName, sizeof( pProjectName ) ); pLastDot = V_strrchr( pProjectName, '.' ); if (pLastDot) { *pLastDot = 0; } fprintf( fp, "Project(\"%s\") = \"%s\", \"%s\", \"{%s}\"\n", szSolutionGUID, pProjectName, szRelativeFilename, pCurProject->GetProjectGUIDString() ); } else { fprintf( fp, "Project(\"%s\") = \"%s\", \"%s\", \"{%s}\"\n", szSolutionGUID, pCurProject->GetName(), szRelativeFilename, pCurProject->GetProjectGUIDString() ); } bool bHasDependencies = false; for ( int iTestProject=0; iTestProject < projects.Count(); iTestProject++ ) { if ( i == iTestProject ) continue; CDependency_Project *pTestProject = projects[iTestProject]; if ( pCurProject->DependsOn( pTestProject, k_EDependsOnFlagCheckNormalDependencies | k_EDependsOnFlagTraversePastLibs | k_EDependsOnFlagRecurse ) || pCurProject->DependsOn( pTestProject, k_EDependsOnFlagCheckAdditionalDependencies | k_EDependsOnFlagTraversePastLibs ) ) { if ( !bHasDependencies ) { fprintf( fp, "\tProjectSection(ProjectDependencies) = postProject\n" ); bHasDependencies = true; } fprintf( fp, "\t\t{%s} = {%s}\n", projects[iTestProject]->GetProjectGUIDString(), projects[iTestProject]->GetProjectGUIDString() ); } } if ( bHasDependencies ) fprintf( fp, "\tEndProjectSection\n" ); fprintf( fp, "EndProject\n" ); } if ( g_pVPC->Is2010() ) { fprintf( fp, "Global\n" ); fprintf( fp, " GlobalSection(SolutionConfigurationPlatforms) = preSolution\n" ); for ( int nPlatformIter = 0; nPlatformIter < allProjectPlatforms.Count(); ++nPlatformIter ) { const char *szVPCPlatformName = allProjectPlatforms[nPlatformIter].Get(); fprintf( fp, " Debug|%s = Debug|%s\n", szVPCPlatformName, szVPCPlatformName ); fprintf( fp, " Release|%s = Release|%s\n", szVPCPlatformName, szVPCPlatformName ); } fprintf( fp, " EndGlobalSection\n" ); fprintf( fp, " GlobalSection(ProjectConfigurationPlatforms) = postSolution\n" ); for ( int nPlatformIter = 0; nPlatformIter < allProjectPlatforms.Count(); ++nPlatformIter ) { const char *szVPCPlatformName = allProjectPlatforms[nPlatformIter].Get(); for ( int i=0; i < projects.Count(); i++ ) { const char *ProjectGUID = projects[i]->GetProjectGUIDString(); IBaseProjectGenerator *pProjectGenerator = projects[i]->m_pProjectGenerator; bool bBuilds = pProjectGenerator->BuildsForTargetPlatform( szVPCPlatformName ); bool bDeploys = pProjectGenerator->DeploysForVPCTargetPlatform( szVPCPlatformName ); if ( bBuilds || bDeploys ) { CUtlString sPlatformAlias = pProjectGenerator->GetSolutionPlatformAlias( szVPCPlatformName, this ); const char *szVisualStudioPlatformName = sPlatformAlias.Get(); fprintf( fp, " {%s}.Debug|%s.ActiveCfg = Debug|%s\n", ProjectGUID, szVPCPlatformName, szVisualStudioPlatformName ); if ( bBuilds ) { fprintf( fp, " {%s}.Debug|%s.Build.0 = Debug|%s\n", ProjectGUID, szVPCPlatformName, szVisualStudioPlatformName ); } if ( bDeploys ) { fprintf( fp, " {%s}.Debug|%s.Deploy.0 = Debug|%s\n", ProjectGUID, szVPCPlatformName, szVisualStudioPlatformName ); } fprintf( fp, " {%s}.Release|%s.ActiveCfg = Release|%s\n", ProjectGUID, szVPCPlatformName, szVisualStudioPlatformName ); if ( bBuilds ) { fprintf( fp, " {%s}.Release|%s.Build.0 = Release|%s\n", ProjectGUID, szVPCPlatformName, szVisualStudioPlatformName ); } if ( bDeploys ) { fprintf( fp, " {%s}.Release|%s.Deploy.0 = Release|%s\n", ProjectGUID, szVPCPlatformName, szVisualStudioPlatformName ); } } } } fprintf( fp, " EndGlobalSection\n" ); fprintf( fp, " GlobalSection(SolutionProperties) = preSolution\n" ); fprintf( fp, " HideSolutionNode = FALSE\n" ); fprintf( fp, " EndGlobalSection\n" ); if ( solutionFolderData.Count() > 0 ) { //Add the nested solution folders fprintf( fp, " GlobalSection(NestedProjects) = preSolution\n" ); FOR_EACH_VEC( solutionFolderData, i ) { if ( !solutionFolderData[i].strParentGUID.IsEmpty() && ShouldWriteSolutionFolder( solutionFolderData[i], solutionFolderData ) ) { fprintf( fp, "\t\t%s = %s\n", solutionFolderData[i].strGUID.Get(), solutionFolderData[i].strParentGUID.Get() ); } } fprintf( fp, " EndGlobalSection\n" ); } fprintf( fp, "EndGlobal\n" ); } fclose( fp ); Sys_CopyToMirror( pSolutionFilename ); } virtual const char *GetSolutionFileExtension() { return "sln"; } virtual SolutionType_t GetSolutionType( void ) OVERRIDE { return ST_VISUALSTUDIO; } const char* FindInFile( const char *pFilename, const char *pFileData, const char *pSearchFor ) { const char *pPos = V_stristr( pFileData, pSearchFor ); if ( !pPos ) { g_pVPC->VPCError( "Can't find %s in %s.", pSearchFor, pFilename ); } return pPos + V_strlen( pSearchFor ); } // Parse g_SolutionItemsFilename, reading in filenames (including wildcards), // and add them to the Solution Items project we're already writing. void WriteSolutionItems( FILE *fp ) { #if defined( PLATFORM_WINDOWS ) CUtlPathStringHolder fullSolutionItemsPath; if ( V_IsAbsolutePath( g_pVPC->GetSolutionItemsFilename() ) ) fullSolutionItemsPath.Set( g_pVPC->GetSolutionItemsFilename() ); else fullSolutionItemsPath.ComposeFileName( g_pVPC->GetStartDirectory(), g_pVPC->GetSolutionItemsFilename() ); g_pVPC->GetScript().PushScript( fullSolutionItemsPath ); int numSolutionItems = 0; while ( g_pVPC->GetScript().GetData() ) { // read a line const char *pToken = g_pVPC->GetScript().GetToken( false ); // strip out \r\n chars char *end = V_strstr( pToken, "\n" ); if ( end ) { *end = '\0'; } end = V_strstr( pToken, "\r" ); if ( end ) { *end = '\0'; } // bail on strings too small to be paths if ( V_strlen( pToken ) < 3 ) continue; // compose an absolute path w/o any ../ CUtlPathStringHolder fullPath; if ( V_IsAbsolutePath( pToken ) ) fullPath.Set( pToken ); else fullPath.ComposeFileName( g_pVPC->GetStartDirectory(), pToken ); fullPath.FixSlashesAndDotSlashes(); if ( V_strstr( fullPath, "*" ) != NULL ) { // wildcard! CUtlPathStringHolder wildcardPath( fullPath ); wildcardPath.StripFilename(); struct _finddata32_t data; intptr_t handle = _findfirst32( fullPath, &data ); if ( handle != -1L ) { do { if ( ( data.attrib & _A_SUBDIR ) == 0 ) { // not a dir, just a filename - add it fullPath.ComposeFileName( wildcardPath, data.name ); fullPath.FixSlashesAndDotSlashes(); fprintf( fp, "\t\t%s = %s\n", fullPath.Get(), fullPath.Get() ); ++numSolutionItems; } } while ( _findnext32( handle, &data ) == 0 ); _findclose( handle ); } } else { // just a file - add it fprintf( fp, "\t\t%s = %s\n", fullPath.Get(), fullPath.Get() ); ++numSolutionItems; } } g_pVPC->GetScript().PopScript(); Msg( "Found %d solution files in %s\n", numSolutionItems, g_pVPC->GetSolutionItemsFilename() ); #endif } void AddSolutionFolder( CUtlString strAbsPath, CUtlString strSearchPattern, CUtlVector< SolutionFolderData_t > &solutionFolders ) { solutionFolders.AddToTail(); SolutionFolderData_t &folder = solutionFolders.Tail(); folder.strAbsPath = strAbsPath; folder.strAbsPath.StripTrailingSlash(); folder.strSearchPattern = strSearchPattern; //Get the name of the folder that will be added to the solution int nPathLength = folder.strAbsPath.Length(); while ( nPathLength > 0 ) { //Find the last path separator in the path if ( PATHSEPARATOR( folder.strAbsPath[nPathLength-1] ) ) { break; } nPathLength--; } folder.strFolderName = folder.strAbsPath.Slice( nPathLength ); folder.strFolderName.ToLower(); //Get the GUID of the folder MD5Context_t ctx; unsigned char digest[MD5_DIGEST_LENGTH]; V_memset( &ctx, 0, sizeof( ctx ) ); V_memset( digest, 0, sizeof( digest ) ); MD5Init( &ctx ); MD5Update( &ctx, (unsigned char *)folder.strAbsPath.Get(), folder.strAbsPath.Length() ); MD5Final( digest, &ctx ); char szMD5[64]; V_binarytohex( digest, MD5_DIGEST_LENGTH, szMD5, sizeof( szMD5 ) ); V_strupper_fast( szMD5 ); char szGUID[100]; V_snprintf( szGUID, sizeof( szGUID ), "{%8.8s-%4.4s-%4.4s-%4.4s-%12.12s}", szMD5, &szMD5[8], &szMD5[12], &szMD5[16], &szMD5[20] ); folder.strGUID = szGUID; } void AddFilesToSolutionFolder( CUtlVector< SolutionFolderData_t > &folders, int nIndex ) { #if defined( PLATFORM_WINDOWS ) CUtlString strSearchPattern = folders[nIndex].strSearchPattern; bool bAllFiles = strSearchPattern == "*.*"; const char *pszSearchExtension = V_GetFileExtensionSafe( strSearchPattern ); CUtlString strSearchPath = CUtlString::PathJoin( folders[nIndex].strAbsPath, "*.*" ); WIN32_FIND_DATA findFileData; HANDLE hFind = FindFirstFile( strSearchPath, &findFileData ); if ( hFind != INVALID_HANDLE_VALUE ) { do { //FindFirstFile and FindNextFile find "." and ".." as files when searched using "*.*" //we don't want these to be added to our lists if ( findFileData.cFileName[0] != '.' ) { //If the found file is actually a directory if ( findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) { //Found a sub-dir, add it to the list of folders and add all the files in the sub-dir CUtlString strSubDirPath = CUtlString::PathJoin( folders[nIndex].strAbsPath, findFileData.cFileName ); AddSolutionFolder( strSubDirPath, folders[nIndex].strSearchPattern, folders ); //Set the parent GUID for the sub-directory int nSubDirIndex = folders.Count() - 1; folders[nSubDirIndex].strParentGUID = folders[nIndex].strGUID; //Recursively add the files from the sub-dir AddFilesToSolutionFolder( folders, nSubDirIndex ); } else { //Add this file to the list if we are adding all files or if this files extension matches the search pattern const char *pszExtension = V_GetFileExtensionSafe( findFileData.cFileName ); if ( bAllFiles || !V_stricmp_fast( pszExtension, pszSearchExtension ) ) { folders[nIndex].files.AddToTail( CUtlString::PathJoin( folders[nIndex].strAbsPath, findFileData.cFileName ) ); } } } } while ( FindNextFile( hFind, &findFileData ) != 0 ); FindClose( hFind ); } #endif } bool ShouldWriteSolutionFolder( SolutionFolderData_t &folder, CUtlVector< SolutionFolderData_t > &solutionFolderData ) { if ( folder.files.Count() > 0 ) { //Write the folder if it has files return true; } else { //Only write empty folders if they are the parent of another folder that has files or children that have files FOR_EACH_VEC( solutionFolderData, i ) { if ( folder.strGUID == solutionFolderData[i].strParentGUID && ShouldWriteSolutionFolder( solutionFolderData[i], solutionFolderData ) ) { return true; } } } return false; } void WriteSolutionFolders( FILE *fp, CUtlVector< SolutionFolderData_t > &solutionFolderData ) { const CUtlVector< CUtlString > &solutionFolderNames = g_pVPC->GetSolutionFolderNames(); char szOldPath[MAX_FIXED_PATH]; V_GetCurrentDirectory( szOldPath, ARRAYSIZE( szOldPath ) ); V_SetCurrentDirectory( g_pVPC->GetSourcePath() ); FOR_EACH_VEC( solutionFolderNames, x ) { //Get the path and search pattern for the folder CUtlString strAbsPath, strSearchPattern; if ( solutionFolderNames[x].GetExtension().IsEmpty() ) { //No search pattern provided, assume "*.*" (all files) strAbsPath = solutionFolderNames[x].AbsPath( NULL, k_bVPCForceLowerCase ); strSearchPattern = "*.*"; } else { //Separate the path and search pattern strAbsPath = solutionFolderNames[x].StripFilename().AbsPath( NULL, k_bVPCForceLowerCase ); strSearchPattern = solutionFolderNames[x].UnqualifiedFilename(); } AddSolutionFolder( strAbsPath, strSearchPattern, solutionFolderData ); AddFilesToSolutionFolder( solutionFolderData, solutionFolderData.Count() - 1 ); } V_SetCurrentDirectory( szOldPath ); //Write out each solution folder FOR_EACH_VEC( solutionFolderData, i ) { if ( ShouldWriteSolutionFolder( solutionFolderData[i], solutionFolderData ) ) { fprintf( fp, "Project(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"%s\", \"%s\", \"%s\"\n", solutionFolderData[i].strFolderName.Get(), solutionFolderData[i].strFolderName.Get(), solutionFolderData[i].strGUID.Get() ); if ( solutionFolderData[i].files.Count() > 0 ) { fprintf( fp, "\tProjectSection(SolutionItems) = preProject\n" ); FOR_EACH_VEC( solutionFolderData[i].files, j ) { fprintf( fp, "\t\t%s = %s\n", solutionFolderData[i].files[j].Get(), solutionFolderData[i].files[j].Get() ); } fprintf( fp, "\tEndProjectSection\n" ); } fprintf( fp, "EndProject\n" ); } } } }; static CSolutionGenerator_Win32 g_SolutionGenerator_Win32; IBaseSolutionGenerator* GetSolutionGenerator_Win32() { return &g_SolutionGenerator_Win32; }
03bddad25a23f788ca9cc54a53b548786a10fbee
d0682eaa9c6f44afa00197f4f3d815bbc8de8003
/P18870.cpp
4e64c98e6aa74c52299c18942c1c6f56c129c326
[ "Unlicense" ]
permissive
daily-boj/SkyLightQP
64d3bf5ef7ae856e51f4574922f9b86355b1057c
5038819b6ad31f94d84a66c7679c746a870bb857
refs/heads/master
2022-03-13T23:29:35.633089
2022-02-07T09:55:33
2022-02-07T09:55:33
253,815,997
6
1
null
null
null
null
UTF-8
C++
false
false
624
cpp
P18870.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; vector<int> arr; vector<int> sorted; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; for (int i = 0; i < N; i++) { int a; cin >> a; arr.push_back(a); sorted.push_back(a); } sort(sorted.begin(), sorted.end()); sorted.erase(unique(sorted.begin(), sorted.end()), sorted.end()); for (int i = 0; i < N; i++) { cout << lower_bound(sorted.begin(), sorted.end(), arr[i]) - sorted.begin() << " "; } return 0; }
7f87bf69f4ea741d78326d68ecb9e8180228f54c
efe452d678c3230168e10f4091699c03460e09ad
/source/comunication/utility.h
86f949c04f8f20a02a3af0c3b3eb6829649ee31d
[]
no_license
kimvnhung/QtAndroidReadSMS
a43fc766d86a2359e42923c16554f5bff50d79d6
3252983475918cead4809dcdeb4a2c1a05e41762
refs/heads/main
2023-08-22T00:20:51.291127
2021-08-02T11:03:15
2021-08-02T11:03:15
370,286,570
0
0
null
null
null
null
UTF-8
C++
false
false
379
h
utility.h
#ifndef UTILITY_H #define UTILITY_H #include "constants.h" #include "QtAndroid" class Utility { public: static void showToast(const QString &message, int duration = Constants::ToastDuration::LONG); static QString getFullDigits(int number, int digitNumber); static int numberDigit(int number); static QString getDisplayValue(int number); }; #endif // UTILITY_H
ebaa19a4147869ca53ef7fbfcc48d006c20f7ca2
efaba38c7e8e79c5c1f7e08bee87036eafd99961
/src/LFU.cpp
beb2b95f78e82e0e70935231463230b0714c2d95
[ "Apache-2.0" ]
permissive
planetHuang/soc
a219334eb030431d70af318015cba5db6e41076f
e7b054a88e90f22375688abd0503adea451b933b
refs/heads/master
2022-11-30T05:52:23.623304
2020-07-29T02:52:57
2020-07-29T02:52:57
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,514
cpp
LFU.cpp
/ Copyright 2018-2020 Bizard-lab. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #include "LFU.hpp" equivalence_class_num_type LFU::get_the_number_of_equivalence_classes()const{ cout<<"cache_manager_LRU::get_the_number_of_equivalence_classes()const 不需要实现,如果错误调用则退出"<<endl; exit(0); return 0; } //获取数据单元的个数 data_cell_num_type LFU::get_the_number_of_data_units()const{ //获取所有数据单元的个数 return LFU_Container.size(); } bool LFU::query_in_cache(queryItem& queryItem){ //在缓存中查询 if(LFU_Container.empty()){ return false; } bool flag = false; for(auto &a : LFU_Container){ if(a.getDims() == queryItem.getDims()){ queryItem.setMeasure(a.getMeasure()); a.add_LFU_count(); flag = true; break; } } if(flag){ return true; }else{ return false; } } void LFU::refresh_cache(const queryItem& queryItem){ //更新缓存 LFU_Container.push_back(queryItem); while(get_the_number_of_data_units() > data_cells_limit_size){ cache_replacement_policy(); } } void LFU::cache_replacement_policy(){ //删除ca和用户模式最小的缓存项 auto min = LFU_Container.begin(); for(auto a = LFU_Container.begin()++ ; a != LFU_Container.end();++a) { if(a->get_LFU_count() < min->get_LFU_count()){ min = a; } } LFU_Container.erase(min); } vector<queryItem> LFU::load_query_file(){ //从文件中读取 vector<vector<string>> temp_queryItemSet; //用来保存从文件读取出来的查询数据 ifstream infile(querySetFilePath); //打开查询项文件 string temp; if (!infile.is_open()){ cout << querySetFilePath + " 路径下文件没打开 " << endl; exit(0); } while(getline(infile,temp)) { vector<string> tempvec ; SplitString(temp,tempvec,","); temp_queryItemSet.push_back (tempvec); } infile.close(); //关闭文件 //从文件读取出来的查询数据,需要区分维度值和度量值,然后放入queryItem对象中 vector<queryItem> ret_queryItemSet; for(auto a:temp_queryItemSet){ dims_type temp_dims; measure_type temp_measure = 0.0; for(int i = 0 ; i < dimsNum;++i){ temp_dims[i] = atoi(a[i].c_str()); } queryItem temp_queryItem(temp_dims,temp_measure); ret_queryItemSet.push_back(temp_queryItem); } //返回vector<queryItem> ret_queryItemSet,这个就是之后查询中用到的实际数据 return ret_queryItemSet; } void LFU::displasy_cachaItem()const{ //打印缓存项 cout<<endl<<endl<< "数据单元的总个数 : "<<get_the_number_of_data_units()<<endl; for_each(LFU_Container.begin(), LFU_Container.end(),[](const queryItem& every_quertItem){ every_quertItem.display(); }); } void LFU::dispaly_experimental_result_to_file(data_cell_num_type queryItemSet_size,int hit,time_t all_time)const{ ofstream to_file; to_file.open(basePath+"LFU算法.txt",ios::trunc); if (!to_file.is_open()){ cout<<"实验结果回写文件失败"<<endl; exit(0); } to_file<<"算法名:LFU"<<endl; to_file<<"查询项个数 : "<<queryItemSet_size<<endl; to_file<<"缓存限制大小(数据单元个数):"<<data_cells_limit_size<<endl; to_file<<"hit 次数 : "<<hit<<endl; to_file<<"hit rate :"<< (float)hit/queryItemSet_size<<endl; to_file<<"总体耗时(秒) : "<<all_time<<endl; to_file<<"数据单元的个数 :"<<get_the_number_of_data_units()<<endl; }
b017c9c1b87829a37d5af47d138a3d43ea9a2883
1d14766f1b8081d2d4e6ed8c54965948e3bd23a4
/RadarEchoTracking/MainWindow.cpp
325cc6c3d4b8ffa9c66197c1c85171329a127f89
[]
no_license
VeinySoft/BeiJingQiXiang2018
5e4f3ddff5619ca07c41d481de4bcdd65ebb7551
9fcfc81d9be091fb4bc44b653ebe9657a5efbd9b
refs/heads/master
2023-01-19T03:51:16.528367
2020-11-24T05:55:46
2020-11-24T05:55:46
268,947,863
0
0
null
null
null
null
GB18030
C++
false
false
97,654
cpp
MainWindow.cpp
#include "StdAfx.h" #include "MainWindow.h" #include "GetTrackBoxListImps.h" #include "StartTrackingAction.h" #include "StopTrackingAction.h" #include "DataInputSettingAction.h" #include "ExportImageAtion.h" #include "TrackBoxSettingAction.h" #include "DrawTrackingBoxPost.h" #include "RestorePointerAction.h" #include "ScaleToMapAction.h" #include "PauseTrackingAction.h" #include "PrevFrameAction.h" #include "NextFrameAction.h" #include "FileNameDockList.h" #include "TrackBoxDockList.h" #include "NcFileLayerDockCheckBox.h" #include "PaoDianDockWidget.h" #include "PaoDianListDialog.h" #include "PlayHistoryTrackAction.h" #include "DirectStartStrackAcion.h" #include "DistroScaleDraw.h" #include "QwtPlotDialogImps.h" #include "ConfigAccesser.h" #include "DrawClipLine.h" #include "FlightAndRasterWindow.h" #include <math.h> #define distance(x1,x2,y1,y2) sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) extern ConfigAccesser g_GlobleConfig; int g_LayerHeight[] = {500, 1500, 2500, 3500, 4500, 5500, 6500, 7500 , 8500, 9500, 10500, 11500, 12500, 13500, 14500, 15500 , 16500, 17500 , 18500, 19500}; int getHeightIndex(int iHeight) { for(int i = 0; i < 20; i++) { if(iHeight == g_LayerHeight[i]) return i; } return -1; } class SnapImageDrawCallback : public osg::Camera::DrawCallback { public: SnapImageDrawCallback() { _snapImageOnNextFrame = false; } void setFileName(const std::string& filename) { _filename = filename; } const std::string& getFileName() const { return _filename; } void setSnapImageOnNextFrame(bool flag) { _snapImageOnNextFrame = flag; } bool getSnapImageOnNextFrame() const { return _snapImageOnNextFrame; } virtual void operator () (const ::osg::Camera& camera) const { if (!_snapImageOnNextFrame) return; int x,y,width,height; x = camera.getViewport()->x(); y = camera.getViewport()->y(); width = camera.getViewport()->width(); height = camera.getViewport()->height(); ::osg::ref_ptr< ::osg::Image> image = new ::osg::Image(); image->readPixels(x,y,width,height,GL_RGB,GL_UNSIGNED_BYTE); osgDB::writeImageFile(*image,_filename); _snapImageOnNextFrame = false; } protected: ::std::string _filename; mutable bool _snapImageOnNextFrame; }; class CameraCallBack : public osg::NodeCallback { public: CameraCallBack() : m_pViewer(0), m_pText(0), m_pMatrixTransform(0){} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::Camera* pC = dynamic_cast<osg::Camera*>(node); if(pC) { osg::Viewport* vp = m_pViewer->getCamera()->getViewport(); if(vp) { double dW = vp->width(); double dH = vp->height(); pC->setProjectionMatrixAsOrtho2D(0, dW,0, dH); if(m_pText) m_pText->setPosition(osg::Vec3(2, dH-20, 0)); } } traverse(node,nv); } inline void setText(osg::ref_ptr<osgText::Text> pText){m_pText = pText;} inline void setViewer(osg::View* pV){m_pViewer = pV;} inline void setMatrix(const osg::ref_ptr<osg::MatrixTransform>& pM) { m_pMatrixTransform = pM; } private: osg::View* m_pViewer; osg::ref_ptr<osgText::Text> m_pText; osg::ref_ptr<osg::MatrixTransform> m_pMatrixTransform; }; class ScaleCallBack : public osg::NodeCallback { public: ScaleCallBack() : m_pViewer(0), m_pText(0){} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::Camera* pC = dynamic_cast<osg::Camera*>(node); if(pC) { osg::Vec3 v3In1(0,0,0), v3In2(100, 100, 0); osg::Vec3 v3Out1, v3Out2; double distance1, distance2; osg::Matrix VPW = pC->getViewMatrix() * pC->getProjectionMatrix() * pC->getViewport()->computeWindowMatrix(); osg::Matrix inverseVPW; inverseVPW.invert(VPW); v3Out1 = v3In1 * inverseVPW; v3Out2 = v3In2 * inverseVPW; distance1 = distance(v3In1.x(), v3In2.x(), v3In1.y(), v3In2.y()); distance2 = distance(v3Out1.x(), v3Out2.x(), v3Out1.z(), v3Out2.z()); std::string txt = QString(" %1km").arg(QString::number(distance2/distance1 * 100 / 1000, 'f', 0)).toStdString(); m_pText->setText(txt); } traverse(node,nv); } inline void setText(osg::ref_ptr<osgText::Text> pText){m_pText = pText;} inline void setViewer(osg::View* pV){m_pViewer = pV;} private: osg::View* m_pViewer; osg::ref_ptr<osgText::Text> m_pText; }; //#include <osg/Matrix> class TransformCallBack : public osg::NodeCallback { public: TransformCallBack(int iTop = 30) : m_iTop(iTop), m_pViewer(0){} virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::MatrixTransform* pMT = dynamic_cast<osg::MatrixTransform*>(node); if(pMT && m_pViewer) { osg::Viewport* pViewPort = m_pViewer->getCamera()->getViewport(); osgViewer::Viewer* pViewer = dynamic_cast<osgViewer::Viewer*>(m_pViewer); double dWidth = pViewPort->width(); double dHeight = pViewPort->height(); if(dHeight > 253 + m_iTop) { osg::Vec3 v3(0, dHeight - (253 + m_iTop), 0); osg::Matrix ma; ma.makeTranslate(v3); pMT->setMatrix(ma); } } traverse(node,nv); } inline void setViewer(osg::View* pV){m_pViewer = pV;} private: osg::View* m_pViewer; int m_iTop; }; inline std::string QStringToStdString(const QString& inStr) { std::string gbkString = ""; QStdWString stdwstring = inStr.toStdWString(); size_t len = inStr.length() * 2; char *p = new char[len]; memset(p, 0, len); if (setlocale(LC_CTYPE, "") == NULL) printf("setlocale failed.\n"); wcstombs(p,stdwstring.c_str(), len); gbkString = p; delete[] p; return gbkString; } MainWindow::MainWindow(void) : m_pViewerQT(0), m_pMap(0) , m_keySwitchMaipulator(new osgGA::KeySwitchMatrixManipulator) , m_pDrawRectMainpulator(new DrawGeometryManipulator(0)) , m_pDrawLineMainpulator(new DrawGeometryManipulator(0)) , m_pDefaultMainpulator(new DefaultManipulator) , m_pTrecCallbackImaps(new TrecCallbackImps) , m_SnapImageDrawCallback(new SnapImageDrawCallback) , m_pHUDCamera(new osg::Camera) , m_FileNameDockList(new FileNameDockList) , m_TrackBoxDockList(new TrackBoxDockList) , m_NcFileLayerDockCheckBox(new NcFileLayerDockCheckBox) , m_PaoDianDockWidget(new PaoDianDockWidget) , m_CurrentFileIndex(1) , m_CurrentRealFileIndex(1) , m_CurrentReplayFileIndex(1) , m_bAutoSaveResult(false) , m_pProgressDlg(nullptr) , m_pPaoDinaControlerInterface(nullptr) { m_pActionGroup = new QActionGroup(this); m_pActionGroup2 = new QActionGroup(this); m_pStartTrackAction = new StartTrackingAction(QIcon("./icon/footReal.png"), QString::fromLocal8Bit("实时数据跟踪"), this); m_pStopTrackAction = new StopTrackingAction(QIcon("./icon/footStop.png"), QString::fromLocal8Bit("停止跟踪"), this); m_pTrackBoxSettingAction = new TrackBoxSettingAction(QIcon("./icon/boxSetting.png"), QString::fromLocal8Bit("跟踪框设置"), this); m_pDataInputSettingAction = new DataInputSettingAction(QIcon("./icon/DataInputSetting.png"), QString::fromLocal8Bit("数据源设置"), this); //m_pExprotImageAction = new ExportImageAtion(QIcon("./icon/export.png"), QString::fromLocal8Bit("保存配置"), this); m_pRestorePointerAction = new RestorePointerAction(QIcon("./icon/hand.png"), QString::fromLocal8Bit("恢复平移缩放"), this); m_pScaleToMapAction = new ScaleToMapAction(QIcon("./icon/allmap.png"), QString::fromLocal8Bit("缩放到全图"), this); m_pPauseTrackAction = new PauseTrackingAction(QIcon("./icon/footPause.png"), QString::fromLocal8Bit("暂停跟踪"), this); m_pPrevAction = new PrevFrameAction(QIcon("./icon/pause.png"), QString::fromLocal8Bit("暂停数据回放"), this); m_pNextAction = new NextFrameAction(QIcon("./icon/stop.png"), QString::fromLocal8Bit("停止数据回放"), this); m_pPlayHistoryTrackAction = new PlayHistoryTrackAction(QIcon("./icon/play.png"), QString::fromLocal8Bit("动画播放"), this); m_DirectStartTrackAction = new DirectStartStrackAcion(QIcon("./icon/foot.png"), QString::fromLocal8Bit("开始跟踪"), this); m_pLoadHidtoryAtion = new QAction(QIcon("./icon/Reload.png"), QString::fromLocal8Bit("历史数据回放"), this); m_pHelpAction = new QAction(/*QIcon("./icon/Reload.png"), */QString::fromLocal8Bit("使用说明"), this); m_pAboutAction = new QAction(/*QIcon("./icon/Reload.png"), */QString::fromLocal8Bit("关于"), this); m_pZoomInAction = new QAction(QIcon("./icon/zoomin.png"), QString::fromLocal8Bit("放大地图"), this); m_pZoomOutAction = new QAction(QIcon("./icon/zoomout.png"), QString::fromLocal8Bit("缩小地图"), this); m_pShutdownAction = new QAction(QIcon("./icon/shutdown.png"), QString::fromLocal8Bit("关闭系统"), this); m_pSaveResultAction = new QAction(QIcon("./icon/export.png"), QString::fromLocal8Bit("导出跟踪结果"), this); m_pSectionLineAction = new QAction(QIcon("./icon/section.png"), QString::fromLocal8Bit("任意剖面图"), this); m_pStrackBoxSectionAction = new QAction(QIcon("./icon/rect.png"), QString::fromLocal8Bit("跟踪框剖面图"), this); m_pDistanctTestAction = new QAction(QIcon("./icon/distance.png"), QString::fromLocal8Bit("测量直线距离"), this); m_pShowResultAction = new QAction(QIcon("./icon/show.png"), QString::fromLocal8Bit("察看结果"), this); m_pSaveSenceAtion = new QAction(QIcon("./icon/image.png"), QString::fromLocal8Bit("导出场景"), this); m_pAutoStartToTrack = new QAction(QIcon("./icon/auto.png"), QString::fromLocal8Bit("自动开始跟踪"), this); m_pAccordingPaoDianToTrackBoxAtion = new QAction(QIcon("./icon/paodiancube.png"), QString::fromLocal8Bit("炮点生成跟踪框"), this); m_pMoveTrackBoxAction = new QAction(QIcon("./icon/copyBox.png"), QString::fromLocal8Bit("移动跟踪框"), this); m_pExportRegionDataAction = new QAction(QIcon("./icon/export_file.png"), QString::fromLocal8Bit("导出选定区域"), this); m_pOpenFlightPathAction = new QAction(QIcon("./icon/flightPath.png"), QString::fromLocal8Bit("轨迹与固定点剖面"), this); m_pPauseTrackAction->setCheckable(true); m_pRestorePointerAction->setCheckable(true); m_pRestorePointerAction->setChecked(true); m_pSectionLineAction->setCheckable(true); //m_pCopyTrackBoxAction->setCheckable(true); m_pStrackBoxSectionAction->setCheckable(true); m_pDistanctTestAction->setCheckable(true); m_pPrevAction->setCheckable(true); m_pTrackBoxSettingAction->setCheckable(true); m_pMoveTrackBoxAction->setCheckable(true); m_pActionGroup->addAction(m_pStartTrackAction); m_pActionGroup->addAction(m_DirectStartTrackAction); m_pActionGroup->addAction(m_pStopTrackAction); m_pActionGroup2->addAction(m_pTrackBoxSettingAction); m_pActionGroup->addAction(m_pDataInputSettingAction); //m_pActionGroup->addAction(m_pExprotImageAction); m_pActionGroup2->addAction(m_pRestorePointerAction); m_pActionGroup->addAction(m_pScaleToMapAction); m_pActionGroup->addAction(m_pPauseTrackAction); m_pActionGroup->addAction(m_pPlayHistoryTrackAction); m_pActionGroup->addAction(m_pLoadHidtoryAtion); m_pActionGroup->addAction(m_pPrevAction); m_pActionGroup->addAction(m_pNextAction); m_pActionGroup->addAction(m_pZoomInAction); m_pActionGroup->addAction(m_pZoomOutAction); m_pActionGroup->addAction(m_pShutdownAction); m_pActionGroup->addAction(m_pSaveResultAction); m_pActionGroup->addAction(m_pSectionLineAction); m_pActionGroup->addAction(m_pStrackBoxSectionAction); m_pActionGroup->addAction(m_pDistanctTestAction); m_pActionGroup->addAction(m_pShowResultAction); m_pActionGroup->addAction(m_pSaveSenceAtion); m_pActionGroup->addAction(m_pAutoStartToTrack); m_pActionGroup->addAction(m_pAccordingPaoDianToTrackBoxAtion); m_pActionGroup->addAction(m_pMoveTrackBoxAction); m_pActionGroup->addAction(m_pExportRegionDataAction); m_pActionGroup->addAction(m_pOpenFlightPathAction); ////////////////////////////////////////////////////////////////////////// addDockWidget(Qt::LeftDockWidgetArea, m_FileNameDockList); addDockWidget(Qt::LeftDockWidgetArea, m_TrackBoxDockList); addDockWidget(Qt::LeftDockWidgetArea, m_NcFileLayerDockCheckBox); addDockWidget(Qt::RightDockWidgetArea, m_PaoDianDockWidget); m_pFileListItemModel = new QStandardItemModel(m_FileNameDockList); m_pTrackBoxItemModel = new QStandardItemModel(m_TrackBoxDockList); m_FileNameDockList->m_Setup.listView->setModel(m_pFileListItemModel); m_TrackBoxDockList->m_Setup.listView->setModel(m_pTrackBoxItemModel); m_TrackBoxDockList->m_Setup.listView->setSelectionMode(QAbstractItemView::MultiSelection); ////////////////////////////////////////////////////////////////////////// qRegisterMetaType<P_TREC_NC_MAP_OUT>("P_TREC_NC_MAP_OUT"); qRegisterMetaType<QStringList>("QStringList&"); qRegisterMetaType<QString>("QString&"); connect(m_pTrecCallbackImaps, SIGNAL(signal_TrecDone( QStringList&, QString&, P_TREC_NC_MAP_OUT)) , SLOT(slot_TrecDone(QStringList&, QString&, P_TREC_NC_MAP_OUT)), Qt::QueuedConnection); ////////////////////////////////////////////////////////////////////////// //m_MySloveThread.m_pMainWindow = this; //m_MySloveThread.m_bToTracking = true; m_MySloveThread.setMainWindow(this); m_MySloveThread.setIsTracking(true); m_MyDisplayRealFile.m_pMainWindow = this; connect(&m_MySloveThread, SIGNAL(signal_TrackDone(const QString&)), SLOT(slot_TrackDone(const QString&)), Qt::QueuedConnection); connect(&m_MySloveThread, SIGNAL(signal_Replay(const QString&)), SLOT(slot_Replay(const QString&)), Qt::QueuedConnection); connect(&m_MySloveThread, SIGNAL(signal_ToDeleteOld(const QString&)), SLOT(slot_ToDeleteOld(const QString&)), Qt::QueuedConnection); connect(this, SIGNAL(signal_InsertFile(const QString&)), SLOT(slot_InsertFile(const QString&)), Qt::QueuedConnection); connect(&m_MySloveThread, SIGNAL(signal_StopTrack()), SLOT(slot_StopTrack()), Qt::QueuedConnection); connect(&m_MyDisplayRealFile, SIGNAL(signal_Replay(const QString&)), SLOT(slot_Replay(const QString&)), Qt::QueuedConnection); connect(m_NcFileLayerDockCheckBox->GetCheckBoxGroup(), SIGNAL(buttonClicked(int)), SLOT(slot_SelectLayer(int))); connect(m_FileNameDockList->m_Setup.listView, SIGNAL(doubleClicked( const QModelIndex&)), SLOT(slot_doubleClicked(const QModelIndex&))); connect(m_FileNameDockList->m_Setup.listView, SIGNAL(clicked( const QModelIndex&)), SLOT(slot_NameListClicked(const QModelIndex&))); connect(m_TrackBoxDockList->m_Setup.listView, SIGNAL(clicked(const QModelIndex&)), SLOT(slot_TrackListClicked(const QModelIndex&))); ////////////////////////////////////////////////////////////////////////// connect(m_TrackBoxDockList->m_Setup.pushButton, SIGNAL(clicked(bool)), SLOT(slot_AddBox(bool))); connect(m_TrackBoxDockList->m_Setup.pushButton_2, SIGNAL(clicked(bool)), SLOT(slot_ModifyBox(bool))); connect(m_TrackBoxDockList->m_Setup.pushButton_3, SIGNAL(clicked(bool)), SLOT(slot_DeleteBox(bool))); connect(m_TrackBoxDockList->m_Setup.pushButton_6, SIGNAL(clicked(bool)), SLOT(slot_CopyBox(bool))); connect(m_FileNameDockList->m_Setup.pushButton_4, SIGNAL(clicked(bool)), SLOT(slot_PreviousFile(bool))); connect(m_FileNameDockList->m_Setup.pushButton_5, SIGNAL(clicked(bool)), SLOT(slot_NextFile(bool))); } MainWindow::~MainWindow(void) { } void MainWindow::slot_ActionTriggered( QAction* action ) { MyActionInterface* pMAI = dynamic_cast<MyActionInterface*>(action); if(pMAI) pMAI->MyAction(); if(action == m_pLoadHidtoryAtion) { StopRealDispaly(); g_GlobleConfig.ModeType(1); SetFileListSelectMode(QListView::ExtendedSelection); this->StartTrack(); } else if(action == m_pZoomInAction) { m_pDefaultMainpulator->MapMZoomIn(); } else if(action == m_pZoomOutAction) { m_pDefaultMainpulator->MapMZoomOut(); } else if(action == m_pShutdownAction) { this->close(); } else if(action == m_pSaveResultAction) { if(m_QwtPlotDialogMap.size() == 0) return; QString strPath = QFileDialog::getExistingDirectory(this, QString::fromLocal8Bit("保存跟踪结果")); if(strPath.size() != 0) { QList<QString> keys = m_QwtPlotDialogMap.keys(); for(int i = 0; i < keys.size(); i++) { QwtPlotDialogImps* pQwtPlotDialog = m_QwtPlotDialogMap.value(keys[i]); pQwtPlotDialog->SaveReuslt(strPath + "\\" + keys[i] + "\\"); } } } else if(action == m_pSectionLineAction) { static int iFirst = 0; bool bChecked = m_pSectionLineAction->isChecked(); if(iFirst == 1) { iFirst = 0; if(bChecked == true) bChecked = false; else bChecked = true; } if(bChecked) { iFirst = 1; m_pDrawClipLine->m_pCI = m_pControlorInterface; m_pDrawClipLine->m_KeySwitch = m_keySwitchMaipulator; m_pDrawClipLine->SetLineUsage(DrawClipLine::NORMAL); m_keySwitchMaipulator->selectMatrixManipulator(2); } else { m_pSectionLineAction->setChecked(false); m_keySwitchMaipulator->selectMatrixManipulator(0); return; } } else if(action == m_pMoveTrackBoxAction) { static int iFirst3 = 0; bool bChecked = m_pMoveTrackBoxAction->isChecked(); if(iFirst3 == 1) { iFirst3 = 0; if(bChecked == true) bChecked = false; else bChecked = true; } if(bChecked) { iFirst3 = 1; m_pDrawClipLine->m_pCI = m_pControlorInterface; m_pDrawClipLine->m_KeySwitch = m_keySwitchMaipulator; m_pDrawClipLine->SetLineUsage(DrawClipLine::MOVE); m_keySwitchMaipulator->selectMatrixManipulator(2); } else { m_pMoveTrackBoxAction->setChecked(false); m_keySwitchMaipulator->selectMatrixManipulator(0); return; } } else if(action == m_pStrackBoxSectionAction) { static int iFirst2 = 0; bool bChecked = m_pStrackBoxSectionAction->isChecked(); if(iFirst2 == 1) { iFirst2 = 0; if(bChecked == true) bChecked = false; else bChecked = true; } if(bChecked) { iFirst2 = 1; m_pDrawClipLine->m_pCI = m_pControlorInterface; m_pDrawClipLine->m_KeySwitch = m_keySwitchMaipulator; m_pDrawClipLine->SetLineUsage(DrawClipLine::STACK); m_keySwitchMaipulator->selectMatrixManipulator(2); } else { m_pStrackBoxSectionAction->setChecked(false); m_keySwitchMaipulator->selectMatrixManipulator(0); return; } } else if(action == m_pDistanctTestAction) { static int iFirst2 = 0; bool bChecked = m_pDistanctTestAction->isChecked(); if(iFirst2 == 1) { iFirst2 = 0; if(bChecked == true) bChecked = false; else bChecked = true; } if(bChecked) { iFirst2 = 1; m_pDrawClipLine->m_pCI = m_pControlorInterface; /*if(m_OpenFileName.size()) { m_pDrawClipLine->m_FileName = m_OpenFileName; } else { if(m_FileList.size() > 1) m_pDrawClipLine->m_FileName = m_FileBaseMapToFilePath.value(m_FileList.at(0)); else { m_pDrawClipLine->m_FileName = ""; return; } }*/ m_pDrawClipLine->m_KeySwitch = m_keySwitchMaipulator; m_pDrawClipLine->SetLineUsage(DrawClipLine::DISTANCE); m_keySwitchMaipulator->selectMatrixManipulator(2); } else { m_pDistanctTestAction->setChecked(false); m_keySwitchMaipulator->selectMatrixManipulator(0); return; } } else if(action == m_pShowResultAction) { QList<QString> keys = m_QwtPlotDialogMap.keys(); for(int i = 0; i < keys.size(); i++) { QwtPlotDialogImps* pQwtPlotDialog = m_QwtPlotDialogMap.value(keys[i]); bool bV = pQwtPlotDialog->IsVisible(); if(!bV) pQwtPlotDialog->Show(keys[i]); } } else if(action == m_pSaveSenceAtion) { QString strFileName = QFileDialog::getSaveFileName(this, QString::fromLocal8Bit("导出图片"), "", "JPEG (*.jpg *.jpeg)"); if(strFileName.size() > 0) ExportImage(strFileName); } else if(action == m_pAutoStartToTrack) { AutoStartToTrack(); } else if(action == m_pAccordingPaoDianToTrackBoxAtion) { GenerateTrackBox(); } else if(action == m_pExportRegionDataAction) { ExportRegionData(); } else if(m_pOpenFlightPathAction == action) { QStringList files = m_RasterNeedFiles; //files.append(); if(files.size() == 0) { QStringList ncFilesList; ncFilesList.push_back(m_FileList[0]); ncFilesList.push_back(m_FileList[m_FileList.size() - 1]); m_pRasterWindow->slot_updateSelectNcFiles(ncFilesList); } else { QStringList ncFilesList; ncFilesList.push_back(files[0]); ncFilesList.push_back(m_FileList[m_FileList.size() - 1]); m_pRasterWindow->slot_updateSelectNcFiles(files); } m_pRasterWindow->show(); //m_pRasterWindow->FillList(); } else { return; } } void MainWindow::LoadBusinessFeature() { MainControlFrame* pMainControlFrame = MainControlFrame::GetMainControlFrameInstance(); pMainControlFrame->LoadFramePlugins(std::string("")); m_pMap = pMainControlFrame->CreateMapFromFactory(0); osg::StateSet* pStateSet = m_pMap->GetRootNode()->getOrCreateStateSet(); //pStateSet->setMode(GL_LIGHTING, osg::StateAttribute::ON); //pStateSet->setMode(GL_LINE_SMOOTH, osg::StateAttribute::ON); //pStateSet->setMode(GL_POLYGON_SMOOTH, osg::StateAttribute::ON); //pStateSet->setMode(GL_BLEND, osg::StateAttribute::ON); m_pView = pMainControlFrame->CreateOsgView(m_pMap); //////////////////////////////////////开启Shader//////////////////////////////////// /*osgViewer::Viewer::Windows windows; osgViewer::Viewer* pViewer = dynamic_cast<osgViewer::Viewer*>(m_pView); pViewer->getWindows(windows); for(osgViewer::Viewer::Windows::iterator itr = windows.begin(); itr != windows.end(); ++itr) { (*itr)->getState()->setShaderCompositionEnabled(true); }*/ ////////////////////////////////////////////////////////////////////////// m_pView->setLightingMode(osg::View::NO_LIGHT); //osg::DisplaySettings::instance()->setNumMultiSamples(16); m_pMap->SetAttachView((osgViewer::View*)m_pView); osg::Camera* pC = m_pView->getCamera(); pC->setClearColor(osg::Vec4(1, 1, 1, 1)/*osg::Vec4(238.0/255.0, 243.0/255.0, 250.0/255.0, 1)*/); pC->setPostDrawCallback(m_SnapImageDrawCallback); QString strMapConfig = QCoreApplication::applicationDirPath() + QString::fromLocal8Bit("/Config/Default.prj"); m_pMap->Load2DMapFromConfig(QStringToStdString(strMapConfig)); m_pViewerQT = new ViewerQT((osgViewer::Viewer*)m_pView, this); m_pViewerQT->setParent(this); //QMdiArea* mdiArea = new QMdiArea(this); //mdiArea->addSubWindow(new QTextBrowser(mdiArea)); this->setCentralWidget(m_pViewerQT); m_keySwitchMaipulator->addMatrixManipulator('1', "default", m_pDefaultMainpulator); m_keySwitchMaipulator->addMatrixManipulator('2', "drawRect", m_pDrawRectMainpulator); m_keySwitchMaipulator->addMatrixManipulator('3', "drawLine", m_pDrawLineMainpulator); //m_keySwitchMaipulator->selectMatrixManipulator('1'); m_pView->setCameraManipulator(m_keySwitchMaipulator); //m_keySwitchMaipulator->home(m_pView->event, *m_pView); AddDrawRectManipulator(); AddDrawLineManipulator(); m_pRootNode = m_pMap->GetRootNode()->asGroup(); /************************************************************************/ /* 加载雷达跟踪显示图层 */ /************************************************************************/ //CreateRadarDisplayLayer(); /************************************************************************/ /* 初始化dock列表 */ /************************************************************************/ //FlushList(); /************************************************************************/ /* 初始化剖面窗口*/ /************************************************************************/ InitRasterWindow(); } void MainWindow::InitRasterWindow() { m_pRasterWindow = new FlightAndRasterWindow(this); if(m_pRasterWindow != 0) { m_pRasterWindow->SetMapToFilePath(&m_FileBaseMapToFilePath); m_pRasterWindow->SetFileList(&m_FileList); connect(this, SIGNAL(signal_SelectFiles(const QStringList&)), m_pRasterWindow, SLOT(slot_updateSelectNcFiles(const QStringList&))); } } void MainWindow::TransformData() { m_pMap->CreateMapData(); //pMap->GetAttachView()->setCameraManipulator(new osgGA::TrackballManipulator); //m_pMap->GetAttachView()->getCamera()->setClearColor(osg::Vec4(0, 0, 0, 1)); /*osgViewer::Viewer* pViewer = dynamic_cast<osgViewer::Viewer*>(pMap->GetAttachView()); pViewer->run();*/ //m_pMap->ScaleToLayer(); } void MainWindow::SetUpActions( QToolBar* pToolBar ) { pToolBar->addAction(m_pStartTrackAction); pToolBar->addAction(m_DirectStartTrackAction); pToolBar->addAction(m_pPauseTrackAction); pToolBar->addAction(m_pStopTrackAction); pToolBar->addSeparator(); pToolBar->addAction(m_pZoomInAction); pToolBar->addAction(m_pZoomOutAction); pToolBar->addAction(m_pRestorePointerAction); pToolBar->addAction(m_pScaleToMapAction); pToolBar->addSeparator(); pToolBar->addAction(m_pLoadHidtoryAtion); pToolBar->addAction(m_pPlayHistoryTrackAction); pToolBar->addAction(m_pPrevAction); pToolBar->addAction(m_pNextAction); pToolBar->addSeparator(); pToolBar->addAction(m_pAutoStartToTrack); pToolBar->addSeparator(); pToolBar->addAction(m_pAccordingPaoDianToTrackBoxAtion); pToolBar->addAction(m_pTrackBoxSettingAction); pToolBar->addAction(m_pMoveTrackBoxAction); pToolBar->addSeparator(); pToolBar->addAction(m_pSectionLineAction); pToolBar->addAction(m_pStrackBoxSectionAction); pToolBar->addAction(m_pDistanctTestAction); pToolBar->addSeparator(); pToolBar->addAction(m_pDataInputSettingAction); pToolBar->addAction(m_pShowResultAction); pToolBar->addAction(m_pSaveResultAction); pToolBar->addAction(m_pSaveSenceAtion); pToolBar->addAction(m_pExportRegionDataAction); pToolBar->addSeparator(); pToolBar->addAction(m_pOpenFlightPathAction); pToolBar->addSeparator(); pToolBar->addAction(m_pShutdownAction); //pToolBar->addAction(m_pExprotImageAction); /*QComboBox* pComboBox = new QComboBox; pComboBox->addItem("111111111111"); pComboBox->addItem("111"); pComboBox->addItem("111"); pComboBox->addItem("111"); pComboBox->addItem("111"); pToolBar->addWidget(pComboBox);*/ connect(m_pActionGroup, SIGNAL(triggered ( QAction *)), this , SLOT(slot_ActionTriggered( QAction*))); connect(m_pActionGroup2, SIGNAL(triggered ( QAction *)), this , SLOT(slot_ActionTriggered( QAction*))); } void MainWindow::AddDrawRectManipulator() { goto_gis::VectorLayer* pVectorLayer = new goto_gis::VectorLayer(0,0,1); pVectorLayer->LayerZ(0.f); pVectorLayer->Visible(true); m_pMap->AddLayer("DrawLayer", pVectorLayer); DrawTrackingBoxPost* pDrawResult = new DrawTrackingBoxPost; pDrawResult->m_DrawLayer = pVectorLayer; DrawRect* pDR = new DrawRect(); pDR->SetDrawLayer(pVectorLayer); pDR->SetColor(osg::Vec4(1.0f, 0.f, 0.f, 1.0f)); pDR->SetResultHandle(pDrawResult); m_pDrawRectMainpulator->SetDrawGeometryData(pDR); } void MainWindow::AddDrawLineManipulator() { goto_gis::VectorLayer* pVectorLayer = new goto_gis::VectorLayer(0,0,1); pVectorLayer->LayerZ(0.f); pVectorLayer->Visible(true); pVectorLayer->CoordTrans(m_pMap->GetCoordinateTransform()); m_pMap->AddLayer("DrawLineLayer", pVectorLayer); DrawTrackingBoxPost* pDrawResult = new DrawTrackingBoxPost; pDrawResult->m_DrawLayer = pVectorLayer; m_pDrawClipLine = new DrawClipLine(); m_pDrawClipLine->SetBoxListInterface(new GetTrackBoxListImps(this)); m_pDrawClipLine->SetDrawLayer(pVectorLayer); m_pDrawClipLine->SetColor(osg::Vec4(1.0f, 0.f, 0.f, 1.0f)); m_pDrawClipLine->SetResultHandle(pDrawResult); m_pDrawLineMainpulator->SetDrawGeometryData(m_pDrawClipLine); } void MainWindow::ScaleToMap() { m_keySwitchMaipulator->computeHomePosition(); m_pDefaultMainpulator->home(0); } void MainWindow::slot_TrecDone( QStringList& fileList, QString& strCubeName, P_TREC_NC_MAP_OUT pOutMap ) { if(pOutMap->size() == 0) { delete pOutMap; return; } if(m_TrecOutData.size() <= 0) { m_TrecOutData = *pOutMap; delete pOutMap; } QwtPlotDialogImps qdi, qdi1; qdi.InitPlot();qdi1.InitBar(); QPolygonF pf; QMap<int, QString> dataTimeList, dataTimeList2; QPolygonF pf2; QPolygonF pf3; QPolygonF pf4; int iXIntev = 0; QVector<QVector<double>> barValues; QVector<int> values; QVector<QColor> colors; std::vector<std::string> fileNames; m_pControlorInterface->GetFileNames(fileNames); bool bOne = true; for(size_t i = 0; i < fileNames.size(); i++) { void* pNcFilePointer = 0; m_pControlorInterface->FileToName(fileNames[i], &pNcFilePointer); TREC_NC_MAP_OUT::iterator be = m_TrecOutData.find((NcFile*)pNcFilePointer); if(be == m_TrecOutData.end()) continue; if(bOne && be != m_TrecOutData.end()) { for(size_t i = 0; i < be->second.ratio.interval.size(); i++) { int iV = be->second.ratio.interval.at(i); values.push_back(iV); int iIndex = m_pControlorInterface->GetIndexFromValue(iV); colors.push_back(m_pControlorInterface->GetColor(iIndex)); } bOne = false; } pf.push_back(QPointF(iXIntev, be->second.precipitation.precipitation)); pf2.push_back(QPointF(iXIntev, be->second.precipitation.content)); QVector<double> barValue; for(size_t ii = 0; ii < be->second.ratio.ratio.size(); ii++) { barValue.push_back(be->second.ratio.ratio.at(ii)); } barValues.push_back(barValue); //pf3.push_back(QPointF(be->second.ratio.interval, be->second.ratio.ratio)); float fTargetFstLon = be->second.speed.Elon; float fTargetFstLat = be->second.speed.Elat; float fTargetLstLon = be->second.speed.NLon; float fTargetLstLat = be->second.speed.Nlat; osg::Vec3 p1, p2, p3, p4; p1.set(fTargetFstLon, fTargetLstLat, 0); p2.set(fTargetLstLon, fTargetLstLat, 0); p3.set(fTargetLstLon, fTargetFstLat, 0); p4.set(fTargetFstLon, fTargetFstLat, 0); m_pControlorInterface->AddRect("", p1, p2, p3, p4, osg::Vec4(0.0, 1.0, 0.0, 1.0)); std::string strName = fileNames[i]; dataTimeList.insert(iXIntev, QString::fromStdString(strName)); dataTimeList2.insert(i - 1, QString::fromStdString(strName)); iXIntev+=10; } DistroScaleDraw* dsd = new DistroScaleDraw(Qt::Vertical, dataTimeList); qdi.DrawPlot(pf, 0, QColor(56, 121, 111), QString::fromLocal8Bit("降水量")); qdi.DrawPlot(pf2, dsd, QColor(123, 231, 111), QString::fromLocal8Bit("液体水含量")); qdi.AddMark(pf); qdi.AddMark(pf2); //qdi.DrawPlot(pf3, QColor(56, 121, 111), QString::fromLocal8Bit("反射率百分比")); qdi.Show(QString::fromLocal8Bit("液体水含量、降水量"), 0, 40); DistroScaleDraw* dsd2 = new DistroScaleDraw(Qt::Vertical, dataTimeList2); qdi1.DrawBar(values, colors, barValues, dsd2); qdi1.AddBarMark(barValues); qdi1.Show(QString::fromLocal8Bit("反射百分率"), 841, 40); } void MainWindow::ExportImage( const QString& fileName ) { m_SnapImageDrawCallback->setFileName(QStringToStdString(fileName)); m_SnapImageDrawCallback->setSnapImageOnNextFrame(true); } void MainWindow::ExportRegionData() { QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); if(selectBoxes.size() <= 0) { QMessageBox::warning(this, QString::fromLocal8Bit("导出框"), QString::fromLocal8Bit("请选择导出框。(可多选)")); return; } QString strOutCSV = QFileDialog::getSaveFileName(this, QString::fromLocal8Bit("导出框内雷达数据"), "", "csv (*.csv)"); if(strOutCSV.size() == 0) return; for(int i = 0; i < selectBoxes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(i).row()); cube_data cd = g_GlobleConfig.GetCubeFromName(item->text()); int upHeight = getHeightIndex(cd.height_up.toInt()); int downHeight = getHeightIndex(cd.height_down.toInt()); QString strName = GetSelectFileName(); QString strFilePath = m_FileBaseMapToFilePath.value(strName); //QString strOutCSV = strPath + QDir::separator() + QString::fromLocal8Bit("_") + cd.name + strName + QString::fromLocal8Bit(".csv"); m_pControlorInterface->ExportPartNcFile(strFilePath, osg::Vec3(cd.left_top_lon, cd.left_top_lat, 0), osg::Vec3(cd.right_bottom_lon, cd.right_bottom_lat, 0), 0, upHeight, downHeight, strOutCSV); } } void MainWindow::AddFileTime() { osg::ref_ptr<osg::Geode> pHUDGeode = new osg::Geode; modelview = new osg::MatrixTransform; pHgtTxt = new osgText::Text(); pHgtTxt->setFont("Fonts/simhei.ttf"); pHgtTxt->setText("0000-00-0 00:00:00 (BJT)"); pHgtTxt->setBackdropColor(osg::Vec4(1, 1, 1, 1)); pHgtTxt->setBoundingBoxColor(osg::Vec4(0, 0, 0, 1)); pHgtTxt->setPosition(osg::Vec3(20, 20, 0)); pHgtTxt->setAutoRotateToScreen(true); pHgtTxt->setCharacterSize(25); pHgtTxt->setBackdropType(osgText::Text::OUTLINE); pHgtTxt->setDrawMode(osgText::Text::TEXT | osgText::Text::BOUNDINGBOX); pHgtTxt->setCharacterSizeMode(osgText::TextBase::SCREEN_COORDS); osg::Vec4 m_markColor(.0, .0,.0,1); pHgtTxt->setColor(m_markColor); pHgtTxt->setAlignment(osgText::Text::LEFT_BOTTOM); pHUDGeode->addDrawable(pHgtTxt); osg::ref_ptr<CameraCallBack> pPCB = new CameraCallBack; pPCB->setMatrix(modelview); pPCB->setText(pHgtTxt); pPCB->setViewer(m_pView); m_pHUDCamera->setUpdateCallback(pPCB); m_pHUDCamera->addChild(pHUDGeode); m_pHUDCamera->setProjectionMatrixAsOrtho2D(0,1027,0,639); //m_pHUDCamera->setClearDepth(1.0); m_pHUDCamera->setClearMask(GL_DEPTH_BUFFER_BIT); m_pHUDCamera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); m_pHUDCamera->setViewMatrix(osg::Matrix::identity()); m_pHUDCamera->setRenderOrder(osg::Camera::POST_RENDER); m_pRootNode->addChild(m_pHUDCamera); AddScale(pHUDGeode); } void MainWindow::AddScale(const osg::ref_ptr<osg::Geode>& geode) { osg::ref_ptr<osgText::Text> pScaleTxt = new osgText::Text(); pScaleTxt->setFont("Fonts/simhei.ttf"); pScaleTxt->setText("1km"); pScaleTxt->setBackdropColor(osg::Vec4(1, 1, 1, 1)); pScaleTxt->setBoundingBoxColor(osg::Vec4(0, 0, 0, 1)); pScaleTxt->setPosition(osg::Vec3(10, 10, 0)); pScaleTxt->setAutoRotateToScreen(true); pScaleTxt->setCharacterSize(25); //pScaleTxt->setBackdropType(osgText::Text::OUTLINE); pScaleTxt->setDrawMode(osgText::Text::TEXT); pScaleTxt->setCharacterSizeMode(osgText::TextBase::SCREEN_COORDS); osg::Vec4 m_markColor(.0, .0,.0,1); pScaleTxt->setColor(m_markColor); pScaleTxt->setAlignment(osgText::Text::LEFT_BOTTOM); osg::ref_ptr<osg::Geometry> pScaleGeom = new osg::Geometry; /////////////////////////////////////////////////////////////////////// osg::ref_ptr<osg::Vec3Array> pVertexArray = new osg::Vec3Array; pVertexArray->push_back(osg::Vec3(100,0, 0)); pVertexArray->push_back(osg::Vec3(100,10,0)); pVertexArray->push_back(osg::Vec3(0,10,0)); pVertexArray->push_back(osg::Vec3(0,0,0)); osg::ref_ptr<osg::Vec2Array> texcoords = new osg::Vec2Array; texcoords->push_back(osg::Vec2(1.0f,0.0f)); texcoords->push_back(osg::Vec2(1.0f,1.0f)); texcoords->push_back(osg::Vec2(0.0f,1.0f)); texcoords->push_back(osg::Vec2(0.0f,0.0f)); osg::ref_ptr<osg::Vec4Array> pColorArray = new osg::Vec4Array; pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); osg::ref_ptr<osg::Vec3Array> pNormalArray = new osg::Vec3Array; pNormalArray->push_back(osg::Vec3(0, -1, 0)); pNormalArray->push_back(osg::Vec3(0, -1, 0)); pNormalArray->push_back(osg::Vec3(0, -1, 0)); pNormalArray->push_back(osg::Vec3(0, -1, 0)); pScaleGeom->setVertexArray(pVertexArray); pScaleGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4)); pScaleGeom->setTexCoordArray(0, texcoords); pScaleGeom->setColorArray(pColorArray); pScaleGeom->setColorBinding(osg::Geometry::BIND_PER_VERTEX); osg::StateSet* pStateSet = pScaleGeom->getOrCreateStateSet(); ///////////////////////////////////设置纹理/////////////////////////////////////// osg::Texture2D* pTexture2D = new osg::Texture2D; pTexture2D->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR); pTexture2D->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR); pTexture2D->setDataVariance(osg::Object::DYNAMIC); osg::Image* pImage = osgDB::readImageFile("./icon/scale.png"); pTexture2D->setImage(pImage); pStateSet->setTextureAttributeAndModes(0,pTexture2D,osg::StateAttribute::ON); pStateSet->setMode(GL_BLEND, osg::StateAttribute::ON); ////////////////////////////////////////////////////////////////////////// geode->addDrawable(pScaleTxt); geode->addDrawable(pScaleGeom); osg::ref_ptr<ScaleCallBack> pSC = new ScaleCallBack; pSC->setText(pScaleTxt); m_pView->getCamera()->addUpdateCallback(pSC); } //extern short gValue1[]; //extern QColor gColorTable1[]; struct MyScalarPrinter: public osgSim::ScalarBar::ScalarPrinter { std::string printScalar(float scalar) { //std::cout<<"In MyScalarPrinter::printScalar"<<std::endl; return ScalarPrinter::printScalar(scalar); } }; void MainWindow::AddColorTable(bool vertical) { osg::ref_ptr<osg::Geometry> pGeom = new osg::Geometry; /////////////////////////////////////////////////////////////////////// osg::ref_ptr<osg::Vec3Array> pVertexArray = new osg::Vec3Array; pVertexArray->push_back(osg::Vec3(90,0, 0)); pVertexArray->push_back(osg::Vec3(90,253,0)); pVertexArray->push_back(osg::Vec3(0,253,0)); pVertexArray->push_back(osg::Vec3(0,0,0)); osg::ref_ptr<osg::Vec2Array> texcoords = new osg::Vec2Array; texcoords->push_back(osg::Vec2(1.0f,0.0f)); texcoords->push_back(osg::Vec2(1.0f,1.0f)); texcoords->push_back(osg::Vec2(0.0f,1.0f)); texcoords->push_back(osg::Vec2(0.0f,0.0f)); osg::ref_ptr<osg::Vec4Array> pColorArray = new osg::Vec4Array; pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); pColorArray->push_back(osg::Vec4(1.0f, 1,1,1.0f)); osg::ref_ptr<osg::Vec3Array> pNormalArray = new osg::Vec3Array; pNormalArray->push_back(osg::Vec3(0, -1, 0)); pNormalArray->push_back(osg::Vec3(0, -1, 0)); pNormalArray->push_back(osg::Vec3(0, -1, 0)); pNormalArray->push_back(osg::Vec3(0, -1, 0)); pGeom->setVertexArray(pVertexArray); pGeom->addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::QUADS,0,4)); pGeom->setTexCoordArray(0, texcoords); pGeom->setColorArray(pColorArray); pGeom->setColorBinding(osg::Geometry::BIND_PER_VERTEX); osg::StateSet* pStateSet = pGeom->getOrCreateStateSet(); ///////////////////////////////////设置纹理/////////////////////////////////////// osg::Texture2D* pTexture2D = new osg::Texture2D; pTexture2D->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR); pTexture2D->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR); pTexture2D->setDataVariance(osg::Object::DYNAMIC); osg::Image* pImage = osgDB::readImageFile("./icon/colorTable.png"); pTexture2D->setImage(pImage); pStateSet->setTextureAttributeAndModes(0,pTexture2D,osg::StateAttribute::ON); pStateSet->setMode(GL_BLEND, osg::StateAttribute::ON); ////////////////////////////////////////////////////////////////////////// osg::ref_ptr<TransformCallBack> pTC = new TransformCallBack; pTC->setViewer(m_pView); osg::ref_ptr<osg::Geode> pGeode = new osg::Geode; pGeode->addDrawable(pGeom); osg::ref_ptr<osg::MatrixTransform> pCompassTransform = new osg::MatrixTransform; pCompassTransform->setUpdateCallback(pTC); pCompassTransform->addChild(pGeode); pCompassTransform->setMatrix(osg::Matrix::identity()); pCompassTransform->setReferenceFrame(osg::Transform::ABSOLUTE_RF); osg::StateSet* pTransState = pCompassTransform->getOrCreateStateSet(); pTransState->setMode(GL_CULL_FACE, osg::StateAttribute::OFF); pCompassTransform->setCullingActive(false); m_pHUDCamera->addChild(pCompassTransform); } void MainWindow::CreateRadarDisplayLayer() { goto_gis::GeosOnTheOsg* pGOTO = goto_gis::GeosOnTheOsg::Instantiate(); goto_gis::Layer* pLayer = new goto_gis::VectorLayer(0, 0, 1); QString strFileName("5.nc"); pGOTO->OpenDataAsLayer(QStringToStdString(strFileName), pLayer); pLayer->CoordTrans(m_pMap->GetCoordinateTransform()); pLayer->Visible(true); pLayer->LayerZ(10); pLayer->CreateLayerData(); m_pMap->AddLayer("radar", pLayer); osg::Node* pNode = m_pMap->GetRootNode(); m_pSetCubesInterface = (SetCubesInterface*)(pLayer->GetDataProvider()->GetExtendInterface(0)); m_pControlorInterface = (ControlorInterface*)(pLayer->GetDataProvider()->GetExtendInterface(1)); } void MainWindow::FlushList() { //FlushCubesList(); FlushFileList(); } void MainWindow::GetTimeString(const QString& str1, QString& strTimeString) { QString strBaseName = str1.left(15); strTimeString = strBaseName.remove("_"); } void MainWindow::FillList() { m_FileBaseMapToFilePath.clear(); m_FileList.clear(); //m_TrackFileList.clear(); if(g_GlobleConfig.ModeType() == 0) { QString strPath = g_GlobleConfig.Path(); QDir dir(strPath); QFileInfoList fileList = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot/*, QDir::Time*/); for(int i = 0; i < fileList.size(); i++) { if(fileList.at(i).isDir() || fileList.at(i).suffix() != "nc") continue; QString strFileName = fileList.at(i).absoluteFilePath(); QFileInfo fileInfo(strFileName); QString strFilePathAndName = fileInfo.absoluteFilePath(); QString strBaseName = fileInfo.baseName(); GetTimeString(strBaseName, strBaseName); m_FileList.push_back(strBaseName); m_FileBaseMapToFilePath.insert(strBaseName , strFilePathAndName); } /*if(fileList.size() > 0) { QString strFileName = fileList.at(0).absoluteFilePath(); QFileInfo fileInfo(strFileName); QString strFilePathAndName = fileInfo.absoluteFilePath(); m_FileList.push_back(fileInfo.baseName()); m_FileBaseMapToFilePath.insert(fileInfo.baseName() , strFilePathAndName); }*/ } else { QString strFileName = g_GlobleConfig.HistoryPath() + "/" + g_GlobleConfig.StartTime() + "<->" + g_GlobleConfig.EndTime() + ".nc"; if(strFileName.contains("<->")) { QFileInfo fileInfo(strFileName); QString FileName = fileInfo.baseName(); QStringList Times = FileName.split("<->"); QDateTime startTime = QDateTime::fromString(Times[0], "yyyy-MM-dd hh:mm:ss"); QDateTime endTime = QDateTime::fromString(Times[1], "yyyy-MM-dd hh:mm:ss"); QDir dir = fileInfo.absoluteDir(); QFileInfoList infoList = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot/*, QDir::Time*/); //m_tniv.clear(); for(int i = 0; i < infoList.size(); i++) { if(infoList.at(i).isDir() || infoList.at(i).suffix() != "nc") continue; QString strFilePath = infoList.at(i).fileName(); QFileInfo info(strFilePath); QString strTemp = info.baseName(); GetTimeString(strTemp, strTemp); //QDateTime currDateTime = QDateTime::fromString("20" + strTemp, "yyyyMMddhhmm"); QDateTime currDateTime = QDateTime::fromString(strTemp, "yyyyMMddhhmmss"); //加载雷达反射 if(startTime <= currDateTime && currDateTime <= endTime) { QString strFilePathAndName = infoList.at(i).absoluteFilePath(); QFileInfo fileInfo(strFilePathAndName); QString strBasename = fileInfo.baseName(); GetTimeString(strBasename, strBasename); m_FileList.push_back(strBasename); m_FileBaseMapToFilePath.insert(strBasename , strFilePathAndName); } } } } //m_OldFileList = m_FileList; } int MainWindow::StartTrack2() { /*if(m_CurrentFileIndex != 1) { QMessageBox::StandardButton but = QMessageBox::information(this, QString::fromLocal8Bit("跟踪记录") , QString::fromLocal8Bit("上一次跟踪未完成是否继续上一次的跟踪 ?"), QMessageBox::Yes, QMessageBox::No); if(but == QMessageBox::No) { m_CurrentFileIndex = 1; ClearTrackResult(); } }*/ m_CurrentRealFileIndex = 1; m_CurrentFileIndex = 1; if(m_CurrentFileIndex == 1) ClearTrackResult(); for(int i = 0; i < m_pFileListItemModel->rowCount(); i++) { QStandardItem* pItem = m_pFileListItemModel->item(i); pItem->setBackground(QBrush(QColor(255, 255, 255))); } PlayStrack(); m_pRestorePointerAction->MyAction(); //SwitchDefalultMaipulator(); QVector<cube_data> mycubes; //g_GlobleConfig.GetCubes(mycubes); QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); if(selectBoxes.size() <= 0) { QMessageBox::warning(this, QString::fromLocal8Bit("跟踪框"), QString::fromLocal8Bit("请选择跟踪框。(可多选)")); return -1; } for(int i = 0; i < selectBoxes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(i).row()); cube_data cd = g_GlobleConfig.GetCubeFromName(item->text()); if(m_iCurrentLayer >= 0 && m_iCurrentLayer < 20) cd.height = QString::number(g_LayerHeight[m_iCurrentLayer]); //else //cd.height = QString::number(-1); mycubes.push_back(cd); } ////////////////////////////////////////////////////////////////////////// /*QStringList selectList; QItemSelectionModel* pSelectFileModel = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectFileIndexes = pISM->selectedRows(); if(selectFileIndexes.size() <= 0) { QMessageBox::warning(this, QString::fromLocal8Bit("跟踪框"), QString::fromLocal8Bit("请选择跟踪框。(可多选)")); return; } for(int i = 0; i < selectFileIndexes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectFileIndexes.at(i).row()); selectList.push_back(item->text()); }*/ /*for(int i = 0; i < mycubes.size(); i++) { cube_data mycd = mycubes.at(i); }*/ //m_MySloveThread.cubes = mycubes; m_MySloveThread.setCubes(mycubes); //m_MySloveThread.m_iMode = g_GlobleConfig.ModeType(); m_MySloveThread.setMode(g_GlobleConfig.ModeType()); m_MySloveThread.start(); return 1; #if 0 for(int i = 0; i < m_FileList.size(); i++) { if(i == 0) { continue; } QString strFile1 = m_FileList.at(i - 1); QString strFile2 = m_FileList.at(i); QString strFilePath1 = m_FileBaseMapToFilePath.value(strFile1); QString strFilePath2 = m_FileBaseMapToFilePath.value(strFile2); for(int ii = 0; ii < mycubes.size(); ii++) { CUBE_DATE cd; cube_data mycd = mycubes.at(ii); cd.fTargetFstLon = mycd.left_top_lon; cd.fTargetFstLat = mycd.right_bottom_lat; cd.fTargetLstLon = mycd.right_bottom_lon; cd.fTargetLstLat = mycd.left_top_lat; cd.iHeightDown = mycd.height_down.toInt(); cd.iHeightUp = mycd.height_up.toInt(); cd.iHeight = mycd.height.toInt(); cd.refs.push_back(20); cd.refs.push_back(30); cd.refs.push_back(40); cd.refs.push_back(50); P_TREC_NC_MAP_OUT pOut = /*m_pControlorInterface->runTrec*/Test(strFilePath1.toStdString() , strFilePath2.toStdString(), cd); /////////////////////////////////handle reslut///////////////////////////////////////// osg::Vec3 p1, p2, p3, p4; float fTargetFstLon = mycd.left_top_lon; float fTargetFstLat = mycd.right_bottom_lat; float fTargetLstLon = mycd.right_bottom_lon; float fTargetLstLat = mycd.left_top_lat; p1.set(fTargetFstLon, fTargetLstLat, 0); p2.set(fTargetLstLon, fTargetLstLat, 0); p3.set(fTargetLstLon, fTargetFstLat, 0); p4.set(fTargetFstLon, fTargetFstLat, 0); m_pControlorInterface->AddRect(mycd.name.toStdString(), p1, p2, p3, p4, osg::Vec4(1.0, 0.0, 0.0, 1.0)); QMap<QString, QVector<sc>>::iterator finded1 = m_Result1.find(mycd.name); sc sc_value; sc_value.p = pOut->begin()->second.precipitation.precipitation; sc_value.c = pOut->begin()->second.precipitation.content; if(finded1 != m_Result1.end()) { finded1.value().push_back(sc_value); } else { QVector<sc> rvector; rvector.push_back(sc_value); m_Result1.insert(mycd.name, rvector); } QMap<QString, QMap<int, QVector<ri>>>::Iterator finded2 = m_Result2.find(mycd.name); //先查跟踪框名,再差对应的反射值。 if(finded2 != m_Result2.end()) { for(size_t iii = 0; iii < pOut->begin()->second.ratio.interval.size(); iii++) { QPolygonF plotData3; float fRatio = pOut->begin()->second.ratio.ratio.at(iii); int iV = pOut->begin()->second.ratio.interval.at(iii); int iNum = pOut->begin()->second.ratio.number.at(iii); ri ri_value; ri_value.in = iNum; ri_value.ir = fRatio; QMap<int, QVector<ri>>::iterator findedValue = finded2.value().find(iV); if(findedValue != finded2.value().end()) { findedValue.value().push_back(ri_value); } else { QVector<ri> riVector; riVector.push_back(ri_value); finded2->insert(iV, riVector); } } } else { QMap<int, QVector<ri>> mapValue; for(size_t iii = 0; iii < pOut->begin()->second.ratio.interval.size(); iii++) { QPolygonF plotData3; float fRatio = pOut->begin()->second.ratio.ratio.at(iii); int iV = pOut->begin()->second.ratio.interval.at(iii); int iNum = pOut->begin()->second.ratio.number.at(iii); ri ri_value; ri_value.in = iNum; ri_value.ir = fRatio; QVector<ri> riVector; riVector.push_back(ri_value); mapValue.insert(iV, riVector); } m_Result2.insert(mycd.name, mapValue); } //////////////////////////////////handle reslut//////////////////////////////////////// m_pControlorInterface->OpenNC(strFilePath2.toStdString()); DisplayPlot(); } m_pControlorInterface->DeleteNcFile(strFilePath1.toStdString()); } #endif } void MainWindow::StartReplay() {/* if(m_CurrentReplayFileIndex != 1) { QMessageBox::StandardButton but = QMessageBox::information(this, QString::fromLocal8Bit("跟踪记录") , QString::fromLocal8Bit("上一次动画播放未完成是否继续上一次的播放 ?"), QMessageBox::Yes, QMessageBox::No); if(but == QMessageBox::No) { m_CurrentReplayFileIndex = 1; } }*/ m_CurrentReplayFileIndex = 1; QVector<cube_data> mycubes; //g_GlobleConfig.GetCubes(mycubes); QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); for(int i = 0; i < selectBoxes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(i).row()); cube_data cd = g_GlobleConfig.GetCubeFromName(item->text()); mycubes.push_back(cd); } //m_MySloveThread.cubes = mycubes; m_MySloveThread.setCubes(mycubes); //m_MySloveThread.m_iMode = g_GlobleConfig.ModeType(); m_MySloveThread.setMode(g_GlobleConfig.ModeType()); m_MySloveThread.start(); //m_pStartTrackAction->setEnabled(false); //m_DirectStartTrackAction->setEnabled(false); } void MainWindow::StartTrack() { m_Result1.clear(); m_Result2.clear(); /************************************************************************/ /* 填充文件列表 */ /************************************************************************/ FillList(); FlushList(); /************************************************************************/ /*开始跟踪 */ /************************************************************************/ if(m_FileList.size() <= 0) return; QString strFile = m_FileList.at(0); QString strFilePath = m_FileBaseMapToFilePath.value(strFile); m_OpenFileName = strFilePath; m_pDrawClipLine->SetFileName(strFilePath); //m_pControlorInterface->OpenNC(strFilePath.toStdString()); m_pControlorInterface->LoadNcFile(QStringToStdString(strFilePath)); m_pControlorInterface->DisplayNcFile(QStringToStdString(strFilePath)); SetTimeText(strFile); //SwitchDrawRectMaipulator(); /*QMessageBox::information(this, QString::fromLocal8Bit("绘制跟踪框") , QString::fromLocal8Bit("请在地图窗口中绘制跟踪框。"));*/ } void MainWindow::DisplayPlot() { static int iPreValue = -100; QMap<QString, QVector<sc>>::iterator i1 = m_Result1.begin(); for(i1; i1 != m_Result1.end(); i1++) { QString strName = i1.key(); QMap<int, QString> dataTimeList; QVector<sc>* pResult = &(i1.value()); QPolygonF plotData1, plotData2, plotData3, plotData4, plotData5;; for(int ii = 0; ii < pResult->size(); ii++) { int iX = (ii)*10; //QString strK = m_FileList[ii + 1]; //dataTimeList.insert(iX, strK); sc pOut = pResult->at(ii); plotData1.push_back(QPointF(iX, pOut.c)); plotData2.push_back(QPointF(iX, pOut.p)); plotData3.push_back(QPointF(iX, pOut.h)); plotData4.push_back(QPointF(iX, pOut.v)); plotData5.push_back(QPointF(iX, pOut.m)); } //////////////////////////////////绘制折线图//////////////////////////////////////// QMap<QString, QwtPlotDialogImps*>::iterator fined = m_QwtPlotDialogMap.find(strName); QwtPlotDialogImps* pPlotDialog = 0; if(fined == m_QwtPlotDialogMap.end()) { pPlotDialog = new QwtPlotDialogImps; pPlotDialog->SetTitle(strName); /*pPlotDialog->SetScaleDraw(0, &m_aixsX); pPlotDialog->SetScaleDraw(1, &m_aixsX); pPlotDialog->SetScaleDraw(2, &m_aixsX);*/ m_QwtPlotDialogMap.insert(strName, pPlotDialog); pPlotDialog->InitAll(); } else { QString strKey = fined.key(); pPlotDialog = fined.value(); } pPlotDialog->DrawPlot(0, "plotData1", plotData1, 0, QColor(123,23,90) , QString::fromLocal8Bit("降水量")); pPlotDialog->DrawPlot(2, "plotData2", plotData2, 0, QColor(23,123,0) , QString::fromLocal8Bit("液态水含量")); pPlotDialog->DrawPlot(3, "plotData3", plotData3, 0, QColor(121, 26, 31) , QString::fromLocal8Bit("回波顶高")); pPlotDialog->DrawPlot(4, "plotData4", plotData4, 0, QColor(101, 121, 0) , QString::fromLocal8Bit("回波体积")); pPlotDialog->DrawPlot(5, "plotData5", plotData5, 0, QColor(38, 230, 111) , QString::fromLocal8Bit("最大反射率")); pPlotDialog->SetScaleDraw(0, &m_aixsX); pPlotDialog->SetScaleDraw(2, &m_aixsX); pPlotDialog->SetScaleDraw(3, &m_aixsX); pPlotDialog->SetScaleDraw(4, &m_aixsX); pPlotDialog->SetScaleDraw(5, &m_aixsX); ///////////////////////////////////绘制折线图/////////////////////////////////////// } QMap<QString, QMap<int, QVector<ri>>>::Iterator i2 = m_Result2.begin(); for(i2; i2 != m_Result2.end(); i2++) { QString strName = i2.key(); QMap<int, QVector<ri>>* pV = &(i2.value()); QMap<int, QVector<ri>>::iterator i22 = pV->begin(); QVector<QPolygonF> plotDataVector; for(i22; i22 != pV->end(); i22++) { QPolygonF plotData3; QVector<float> otherValue; int iKey = i22.key(); QVector<ri>* pri = &(i22.value()); QMap<int, QString> dataTimeList; for(int iiii = 0; iiii < pri->size(); iiii++) { plotData3.push_back(QPointF(iiii * 10, pri->at(iiii).in)); otherValue.push_back(pri->at(iiii).ir); //dataTimeList.insert(iiii * 10, m_FileList[iiii + 1]); } ////////////////////////////////////////////////////////////////////////// //DistroScaleDraw* dsd = new DistroScaleDraw(Qt::Vertical, dataTimeList); QMap<QString, QwtPlotDialogImps*>::Iterator fined = m_QwtPlotDialogMap.find(strName); QwtPlotDialogImps* pPlotDialog = 0; if(fined == m_QwtPlotDialogMap.end()) { pPlotDialog = new QwtPlotDialogImps; m_QwtPlotDialogMap.insert(strName, pPlotDialog); /*pPlotDialog->SetScaleDraw(0, &m_aixsX); pPlotDialog->SetScaleDraw(1, &m_aixsX); pPlotDialog->SetScaleDraw(2, &m_aixsX);*/ pPlotDialog->InitAll(); } else { pPlotDialog = fined.value(); } int iIndex = m_pControlorInterface->GetIndexFromValue(iKey); QColor colr(0,0,0); if(iIndex != 0) { colr = m_pControlorInterface->GetColor(iIndex - 1); } QString strTitle; if(i22 == pV->begin()) { strTitle = "< " + QString("%1").arg(iKey); iPreValue = iKey; } else { strTitle = QString("%1 - %2").arg(iPreValue).arg(iKey); iPreValue = iKey; } pPlotDialog->DrawPlot(1, strTitle, plotData3, 0 , colr, strTitle, &otherValue); pPlotDialog->SetScaleDraw(1, &m_aixsX); ////////////////////////////////////////////////////////////////////////// } } //////////////////////////////////////添加跟踪狂截图//////////////////////////////////// m_ClipNcResultMutex.lock(); QMap<QString, QMap<QString, QImage*>>::iterator be = m_ClipNcImageResult.begin(); for(be; be != m_ClipNcImageResult.end(); be++) { QMap<QString, QwtPlotDialogImps*>::Iterator fined = m_QwtPlotDialogMap.find(be.key()); QwtPlotDialogImps* pPlotDialog = 0; if(fined == m_QwtPlotDialogMap.end()) { pPlotDialog = new QwtPlotDialogImps; pPlotDialog->InitAll(); } else { pPlotDialog = fined.value(); } QMap<QString, QImage*>::iterator bebe = be.value().begin(); for(bebe; bebe != be.value().end(); bebe++) { pPlotDialog->AddClipImage(bebe.value(), bebe.key()); delete bebe.value(); } } m_ClipNcImageResult.clear(); /////////////////////////////////////添加剖面图///////////////////////////////////// /*QMap<QString, QMap<QString, QImage*>>::iterator */be = m_SectionImageResult.begin(); for(be; be != m_SectionImageResult.end(); be++) { QMap<QString, QwtPlotDialogImps*>::Iterator fined = m_QwtPlotDialogMap.find(be.key()); QwtPlotDialogImps* pPlotDialog = 0; if(fined == m_QwtPlotDialogMap.end()) { pPlotDialog = new QwtPlotDialogImps; pPlotDialog->InitAll(); } else { pPlotDialog = fined.value(); } QMap<QString, QImage*>::iterator bebe = be.value().begin(); for(bebe; bebe != be.value().end(); bebe++) { pPlotDialog->AddSectionImage(bebe.value(), bebe.key()); delete bebe.value(); } } m_SectionImageResult.clear(); m_ClipNcResultMutex.unlock(); ////////////////////////////////////////////////////////////////////////// QList<QString> keys = m_QwtPlotDialogMap.keys(); for(int i = 0; i < keys.size(); i++) { QwtPlotDialogImps* pQwtPlotDialog = m_QwtPlotDialogMap.value(keys[i]); bool bV = pQwtPlotDialog->IsVisible(); if(!bV) pQwtPlotDialog->Show(keys[i]); } } P_TREC_NC_MAP_OUT MainWindow::Test( std::string& file1, std::string& file2, CUBE_DATE& cd ) { Sleep(1500); static float fzz = 0.01; float firstLat(cd.fTargetFstLat), firstLon(cd.fTargetFstLon) , lastLat(cd.fTargetLstLat), lastLon(cd.fTargetLstLon); static float v1 = 1.10; static float v2 = 2.5; static float p1 = 0.33; //static float p2 = 0; //static float p3 = 0; //static float p4 = 0; static int p2 = 234; TREC_NC_MAP_OUT* rr = new TREC_NC_MAP_OUT; TREC_OUT ooo; ooo.precipitation.content = v1; ooo.precipitation.precipitation = v2; for(size_t i = 0; i < cd.refs.size(); i++) { //srand(100); ooo.ratio.interval.push_back(cd.refs.at(i)); ooo.ratio.ratio.push_back(rand() % 50); ooo.ratio.number.push_back((rand() + 20) % 100); } v1 += 0.5; v2 += 0.8; p1 += 0.3; p2 += 13; firstLat += fzz; firstLon += fzz; lastLat += fzz; lastLon += fzz; ooo.speed.Elat = lastLat;// ooo.speed.Elon = lastLon; ooo.speed.Nlat = firstLat; ooo.speed.NLon = firstLon; (*rr)[0] = ooo; fzz += 0.05; return rr; } void MainWindow::DisplayRadarData(const QString& strFile, const QIcon* pIcon) { QFileInfo fileInfo(strFile); QString strBaseName = fileInfo.baseName(); GetTimeString(strBaseName, strBaseName); QList<QStandardItem*> pItems = m_pFileListItemModel->findItems(strBaseName); if(pItems.size() != 0) { if(pIcon) pItems[0]->setIcon(*pIcon); m_FileNameDockList->m_Setup.listView->setCurrentIndex(pItems[0]->index()); //pItems[0]->setBackground(QBrush(QColor(0, 255, 0))); //m_pFileListItemModel->curr } SetTimeText(strBaseName); //QDateTime currDateTime = QDateTime::fromString("20" + strBaseName, "yyyyMMddhhmm"); //currDateTime.setTimeSpec(Qt::UTC); //QDateTime bjtDateTime = currDateTime.addSecs(8 * 3600);//.toTimeSpec(Qt::LocalTime); //pHgtTxt->setText(bjtDateTime.toString("yyyy-MM-dd hh:mm:ss (BJT)").toAscii().data()); m_pControlorInterface->DisplayNcFile(QStringToStdString(strFile)); } void MainWindow::slot_TrackDone(const QString& doneFile) { //QIcon icon("./icon/foot.ico"); DisplayRadarData(doneFile); QFileInfo fileInfo(doneFile); QString strBaseName = fileInfo.baseName(); GetTimeString(strBaseName, strBaseName); QList<QStandardItem*> pItems = m_pFileListItemModel->findItems(strBaseName); if(pItems.size() != 0) { pItems[0]->setBackground(QBrush(QColor(0, 255, 0))); //m_pFileListItemModel->curr } /*for(QSet<ResultRect>::iterator i = m_RectResultSet.begin() ; i != m_RectResultSet.end(); i++)*/ m_ResultMutex.lock(); int iRectCount = m_RectResultSet.size(); for(int i = 0; i < iRectCount; i++) { m_pControlorInterface->AddRect(QStringToStdString(m_RectResultSet.at(i).name) , (osg::Vec3)m_RectResultSet.at(i).p1 , (osg::Vec3)m_RectResultSet.at(i).p2 , (osg::Vec3)m_RectResultSet.at(i).p3 , (osg::Vec3)m_RectResultSet.at(i).p4 , (osg::Vec4)m_RectResultSet.at(i).color, QStringToStdString(strBaseName)); } m_RectResultSet.clear(); DisplayPlot(); m_ResultMutex.unlock(); if(m_bAutoSaveResult == true) { ChangeProcess(1); } } void MainWindow::ChangeRectColor(const QString& strBaseName ) { QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); for(int i = 0; i < selectBoxes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(i).row()); cube_data cd = g_GlobleConfig.GetCubeFromName(item->text()); ; int iIndex = m_SelectFilesList.indexOf(strBaseName); if(iIndex >= 0) { m_pControlorInterface->SetRectColor(QStringToStdString(cd.name), iIndex, osg::Vec4(0, 0, 0, 1)); } } } void MainWindow::slot_Replay( const QString& doneFile ) { DisplayRadarData(doneFile); #if 1 m_ResultMutex.lock(); int iRectCount = m_RectResultSet.size(); //qDebug()<<doneFile<<iRectCount; for(int i = 0; i < iRectCount; i++) { QFileInfo fileInfo(doneFile); QString strBaseName = fileInfo.baseName(); GetTimeString(strBaseName, strBaseName); int iIndex = m_SelectFilesList.indexOf(strBaseName); if(iIndex > 0) { std::string strName = QStringToStdString(m_RectResultSet.at(i).name); m_pControlorInterface->SetRectColor(strName, iIndex, osg::Vec4(0, 0, 0, 1)); } } m_RectResultSet.clear(); m_ResultMutex.unlock(); #endif } void MainWindow::slot_ToDeleteOld( const QString& preFile ) { m_pControlorInterface->DeleteNcFile(QStringToStdString(preFile)); } int MainWindow::GetTrackFileID( QPair<QString, QString>& filePair, int iType ) { QStringList* pST = 0; int* pCurrentIndex = 0; switch(iType) { case 0: pST = &m_SelectFilesList; pCurrentIndex = &m_CurrentFileIndex; break; case 1: pST = &m_SelectReplayFilesList; pCurrentIndex = &m_CurrentReplayFileIndex; break; default: break; } //m_FileListMutex.lock(); if(/*m_CurrentFileIndex*/ *pCurrentIndex < /*m_FileList*/pST->size()) { filePair.first = /*m_FileList*/pST->at(*pCurrentIndex - 1); filePair.second = /*m_FileList*/pST->at(*pCurrentIndex); //m_FileListMutex.unlock(); (*pCurrentIndex)++; return 1; } else { *pCurrentIndex = 1; //m_FileListMutex.unlock(); return 0; } } QString& MainWindow::GetTrackFilePath( const QString& strID ) { static QString strVV = ""; m_FilePathMutex.lock(); strVV = m_FileBaseMapToFilePath.value(strID); m_FilePathMutex.unlock(); return strVV; } int MainWindow::GetRealTrackFileID( QPair<QString, QString>& filePair, int iType ) { int* pCurrentIndex = 0; QStringList* pLocalSelectListFiles = 0; if(iType == 0) { pLocalSelectListFiles = &m_SelectFilesList; pCurrentIndex = &m_CurrentRealFileIndex; } else if(iType == 1) { pLocalSelectListFiles = &m_SelectReplayFilesList; pCurrentIndex = &m_CurrentReplayFileIndex; } else { return -2; } if(*pCurrentIndex < pLocalSelectListFiles->size()) { filePair.first = pLocalSelectListFiles->at(*pCurrentIndex - 1); filePair.second = pLocalSelectListFiles->at(*pCurrentIndex); (*pCurrentIndex)++; return 0; } else { if(pLocalSelectListFiles->size() <= 0) return -1; static QString curFileBaseName = pLocalSelectListFiles->at(pLocalSelectListFiles->size() - 1); //static QDateTime curTime = QDateTime::fromString("20" + curFileBaseName, "yyyyMMddhhmm"); static QDateTime curTime = QDateTime::fromString(curFileBaseName, "yyyyMMddhhmmss"); QString strFilePath = g_GlobleConfig.Path(); QDir dir(strFilePath); QFileInfoList fileList = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed); for(int i = 0; i < fileList.size(); i++) { if(fileList.at(i).isDir() || fileList.at(i).suffix() != "nc") continue; QString strFileName = fileList.at(i).absoluteFilePath(); QFileInfo fileInfo(strFileName); QString strBaseName = fileInfo.baseName(); GetTimeString(strBaseName, strBaseName); //QDateTime newDateTime = QDateTime::fromString("20" + strBaseName, "yyyyMMddhhmm"); QDateTime newDateTime = QDateTime::fromString(strBaseName, "yyyyMMddhhmmss"); if(!newDateTime.isValid()) continue; if(newDateTime > curTime) { m_FileList.push_back(strBaseName); emit signal_InsertFile(strBaseName); QString strFilePathAndName = fileInfo.absoluteFilePath(); strBaseName = fileInfo.baseName(); GetTimeString(strBaseName, strBaseName); m_FileBaseMapToFilePath.insert(strBaseName , strFilePathAndName); filePair.first = curFileBaseName; filePair.second = strBaseName; curTime = newDateTime; curFileBaseName = strBaseName; (*pCurrentIndex)++; return 1; } return -1; } return -1; } } QString& MainWindow::GetRealTrackFilePath( const QString& strID ) { static QString temp; return temp; } void MainWindow::slot_InsertFile( const QString& fileBase ) { //FlushFileList(); m_SelectFilesList.push_back(fileBase); QStandardItem* ci = new QStandardItem(fileBase); ci->setEditable(false); m_pFileListItemModel->appendRow(ci); } void MainWindow::FlushCubesList() { m_pTrackBoxItemModel->clear(); m_pControlorInterface->RemoveAllRects(); QVector<cube_data> myCubeData; //std::vector<CUBE_DATE> cubes; g_GlobleConfig.GetCubes(myCubeData); for(int i = 0; i < myCubeData.size(); i++) { cube_data* pCD = &(myCubeData[i]); QString strName = pCD->name; QStandardItem* ci = new QStandardItem(QIcon("./icon/cube.png"), strName); ci->setEditable(false); m_pTrackBoxItemModel->appendRow(ci); osg::Vec3 p1, p2, p3, p4; float fTargetFstLon = pCD->left_top_lon; float fTargetFstLat = pCD->right_bottom_lat; float fTargetLstLon = pCD->right_bottom_lon; float fTargetLstLat = pCD->left_top_lat; p1.set(fTargetFstLon, fTargetLstLat, 0); p2.set(fTargetLstLon, fTargetLstLat, 0); p3.set(fTargetLstLon, fTargetFstLat, 0); p4.set(fTargetFstLon, fTargetFstLat, 0); m_pControlorInterface->AddRect(QStringToStdString(strName), p1, p2, p3, p4, osg::Vec4(.0, 0.0, 0.0, 1.0)); m_pControlorInterface->HideRects(QStringToStdString(strName), true); } } void MainWindow::FlushFileList() { m_pFileListItemModel->clear(); //m_aixsX.clear(); for(int i = 0; i < m_FileList.size(); i++) { QString strBaseName = m_FileList.at(i); QStandardItem* ci = new QStandardItem(strBaseName); ci->setEditable(false); m_pFileListItemModel->appendRow(ci); //m_aixsX.insert(i * 10, strBaseName); } //m_FileNameDockList->m_Setup.listView->setCurrentIndex(QMode) FlushPlotAixsMark(); } void MainWindow::slot_SelectLayer( int index ) { if(index > 19) { m_iCurrentLayer = -1; m_pControlorInterface->SeleteLayer(-1); } else { m_pControlorInterface->SeleteLayer(index); m_iCurrentLayer = index; } m_pControlorInterface->LoadNcFile(QStringToStdString(m_OpenFileName)); m_pControlorInterface->DisplayNcFile(QStringToStdString(m_OpenFileName)); } void MainWindow::closeEvent( QCloseEvent* event ) { QList<QString> keys = m_QwtPlotDialogMap.keys(); for(int i = 0; i < keys.size(); i++) { QwtPlotDialogImps* pD = m_QwtPlotDialogMap.value(keys[i]); pD->CloseAll(); delete pD; //pD->->close(); } } void MainWindow::slot_NameListClicked(const QModelIndex& index) { QItemSelectionModel* pISM = m_FileNameDockList->m_Setup.listView->selectionModel(); QModelIndexList mil = pISM->selectedRows(); if(mil.size() >= 0) { QModelIndex first = mil.at(0); //QModelIndex tail = mil.at(mil.size() - 1); QStandardItem* pItem1 = m_pFileListItemModel->item(first.row()); //QStandardItem* pItem2 = m_pFileListItemModel->item(tail.row()); QStringList selectPairNames; selectPairNames.push_back(pItem1->text()); //selectPairNames.push_back(pItem2->text()); m_RasterNeedFiles.clear(); m_RasterNeedFiles.push_back(pItem1->text()); emit signal_SelectFiles(selectPairNames); } } void MainWindow::slot_doubleClicked( const QModelIndex& index ) { QStandardItem* pItem = m_pFileListItemModel->item(index.row()); if(pItem) { QString strFilePath = m_FileBaseMapToFilePath.value(pItem->text()); SetTimeText(pItem->text()); /*QDateTime currDateTime = QDateTime::fromString("20" + pItem->text(), "yyyyMMddhhmm"); currDateTime.setTimeSpec(Qt::UTC); QDateTime bjtDateTime = currDateTime.addSecs(8 * 3600); pHgtTxt->setText(bjtDateTime.toString("yyyy-MM-dd hh:mm:ss (BJT)").toAscii().data());*/ if(strFilePath.size() != 0) { m_OpenFileName = strFilePath; m_pDrawClipLine->SetFileName(strFilePath); std::string strTemp = QStringToStdString(strFilePath); m_pControlorInterface->LoadNcFile(QStringToStdString(strFilePath)); m_pControlorInterface->DisplayNcFile(QStringToStdString(strFilePath)); } ChangeRectColor(pItem->text()); } } void MainWindow::ClearTrackResult() { QList<QString> keys = m_QwtPlotDialogMap.keys(); for(int i = 0; i < keys.size(); i++) { QwtPlotDialogImps* pD = m_QwtPlotDialogMap.value(keys[i]); pD->CloseAll(); delete pD; } m_QwtPlotDialogMap.clear(); //FlushCubesList(); m_pControlorInterface->RemoveTrackBox(); m_Result1.clear(); m_Result2.clear(); } void MainWindow::slot_TrackListClicked( const QModelIndex& index ) { QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList mil = pISM->selectedRows(); int iI = mil.indexOf(index); QStandardItem* pSI = m_pTrackBoxItemModel->item(index.row()); if(iI == -1) { m_pControlorInterface->HideRects(pSI->text().toStdString(), true); } else { m_pControlorInterface->HideRects(pSI->text().toStdString(), false); m_pDrawClipLine->SetCurrentRectName(pSI->text()); } } void MainWindow::TrackBoxSelectState() { } void MainWindow::slot_StopTrack() { //m_pStartTrackAction->setEnabled(true); //m_DirectStartTrackAction->setEnabled(true); EnabledTrack(true); EnabledReplay(true); m_DirectStartTrackAction->setEnabled(true); m_pPlayHistoryTrackAction->setEnabled(true); if(m_bAutoSaveResult) { //save result QString strPath = g_GlobleConfig.TrackResultSavePath(); QList<QString> keys = m_QwtPlotDialogMap.keys(); for(int i = 0; i < keys.size(); i++) { QwtPlotDialogImps* pQwtPlotDialog = m_QwtPlotDialogMap.value(keys[i]); pQwtPlotDialog->SaveReuslt(strPath + "\\" + keys[i] + "\\"); } ChangeProcess(1); m_bAutoSaveResult = true; if(m_pProgressDlg) { m_pProgressDlg->cancel(); delete m_pProgressDlg; m_pProgressDlg = nullptr; } } } void MainWindow::FillSelectList(int iType) { QStringList* pST = 0; switch(iType) { case 0: pST = &m_SelectFilesList; break; case 1: pST = &m_SelectReplayFilesList; break; default: break; } pST->clear(); //QStringList selectList; QItemSelectionModel* pSelectFileModel = m_FileNameDockList->m_Setup.listView->selectionModel(); QModelIndexList selectFileIndexes = pSelectFileModel->selectedRows(); int iRowCount = 0; int iRowStartIndex = -1; if(selectFileIndexes.size() <= 0) { iRowCount = m_pFileListItemModel->rowCount(); iRowStartIndex = 0; //return; } else if(selectFileIndexes.size() == 1) { int ic = m_pFileListItemModel->rowCount(); int ir = selectFileIndexes.at(0).row(); iRowCount = (ic - 1 - ir) + 1; iRowStartIndex = selectFileIndexes.at(0).row(); } else { iRowCount = selectFileIndexes.at(selectFileIndexes.size() - 1).row() - selectFileIndexes.at(0).row() + 1; iRowStartIndex = selectFileIndexes.at(0).row(); } for(int i = 0; i < iRowCount; i++) { QStandardItem* item = m_pFileListItemModel->item(iRowStartIndex + i); pST->push_back(item->text()); } FlushPlotAixsMark(); } void MainWindow::FlushPlotAixsMark() { m_aixsX.clear(); for(int i = 0; i < m_SelectFilesList/*m_FileList*/.size(); i++) { QString strBaseName = m_SelectFilesList/*m_FileList*/.at(i); m_aixsX.insert(i * 10, strBaseName); } } void MainWindow::EnabledTrack( bool bd ) { m_DirectStartTrackAction->setEnabled(bd); m_pStartTrackAction->setEnabled(bd); m_pLoadHidtoryAtion->setEnabled(bd); } void MainWindow::EnabledReplay( bool br ) { m_pPlayHistoryTrackAction->setEnabled(br); m_pLoadHidtoryAtion->setEnabled(br); m_pTrackBoxSettingAction->setEnabled(br); m_pStartTrackAction->setEnabled(br); //m_pPrevAction->setEnabled(br); //m_pNextAction->setEnabled(br); } void MainWindow::DefaultTrackStart() { m_pStartTrackAction->MyAction(); } #include "CubeSettingsDialogImps.h" void MainWindow::slot_DeleteBox(bool) { QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); if(selectBoxes.size() <= 0) { QMessageBox::warning(this, QString::fromLocal8Bit("跟踪框") , QString::fromLocal8Bit("请选择要删除的跟踪框。(可多选)")); return; } for(int i = 0; i < selectBoxes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(i).row()); g_GlobleConfig.ConfigCubes(2, item->text(), 0); } FlushCubesList(); g_GlobleConfig.Write(); } void MainWindow::slot_AddBox(bool) { CubeSettingsDialogImps d; QString strName = GetSelectFileName(); if(strName.size() == 0) { strName = "NewTrackBox"; } d.SetCubeName(strName); d.SetMode(0); if(d.exec() == QDialog::Accepted) { FlushCubesList(); g_GlobleConfig.Write(); } } void MainWindow::slot_ModifyBox(bool) { CubeSettingsDialogImps d; d.SetMode(1); QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); if(selectBoxes.size() > 1 || selectBoxes.size() == 0) { QMessageBox::warning(this, QString::fromLocal8Bit("跟踪框") , QString::fromLocal8Bit("只能选择一个跟踪框去编辑。")); return; } QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(0).row()); cube_data cd = g_GlobleConfig.GetCubeFromName(item->text()); d.SetValue(cd); if(d.exec() == QDialog::Accepted) { FlushCubesList(); g_GlobleConfig.Write(); } } void MainWindow::SetUpMenus( QMenuBar* pMB ) { QMenu* pMenu = new QMenu(pMB); pMenu->setTitle(QString::fromLocal8Bit("实时数据跟踪(&R)")); pMenu->addAction(m_pStartTrackAction); pMenu->addAction(m_pTrackBoxSettingAction); pMenu->addAction(m_pPlayHistoryTrackAction); pMB->addMenu(pMenu); pMenu = new QMenu(pMB); pMenu->setTitle(QString::fromLocal8Bit("历史数据回放(&T)")); pMenu->addAction(m_pLoadHidtoryAtion); pMenu->addAction(m_pTrackBoxSettingAction); pMenu->addAction(m_pPlayHistoryTrackAction); pMB->addMenu(pMenu); pMenu = new QMenu(pMB); pMenu->setTitle(QString::fromLocal8Bit("系统配置(&S)")); pMenu->addAction(m_pDataInputSettingAction); pMB->addMenu(pMenu); pMenu = new QMenu(pMB); pMenu->setTitle(QString::fromLocal8Bit("帮助(&H)")); pMenu->addAction(m_pHelpAction); pMenu->addAction(m_pAboutAction); pMB->addMenu(pMenu); } QString MainWindow::GetSelectFileName() { QModelIndex mi = m_FileNameDockList->m_Setup.listView->currentIndex(); QString strName = "TrackCube"; if(mi.isValid()) { strName = m_pFileListItemModel->item(mi.row())->text(); return strName; } else { return ""; } } void MainWindow::SetTimeText( const QString& text ) { QDateTime currDateTime = QDateTime::fromString(text, "yyyyMMddhhmmss"); currDateTime.setTimeSpec(Qt::UTC); QDateTime bjtDateTime = currDateTime.addSecs(8 * 3600);//.toTimeSpec(Qt::LocalTime); pHgtTxt->setText(bjtDateTime.toString("yyyy-MM-dd hh:mm:ss (BJT)").toAscii().data()); } void MainWindow::LoadPaoDian() { goto_gis::GeosOnTheOsg* pGOTO = goto_gis::GeosOnTheOsg::Instantiate(); goto_gis::Layer* pLayer = new goto_gis::VectorLayer(0, 0, 1); QString strFileName("./Config/PaoDian.bjpd"); pGOTO->OpenDataAsLayer(QStringToStdString(strFileName), pLayer); pLayer->CoordTrans(m_pMap->GetCoordinateTransform()); pLayer->Visible(true); pLayer->LayerZ(-10); pLayer->SetLayerColor(osg::Vec4(136/255.0, 0, 21/255.0, 1)); pLayer->CreateLayerData(); m_pMap->AddLayer("PaoDian", pLayer); //osg::Node* pNode = m_pMap->GetRootNode(); m_pPaoDinaControlerInterface = (PaoDinaControlerInterface*)(pLayer->GetDataProvider()->GetExtendInterface(0)); m_PaoDianDockWidget->LoadSlot(m_pPaoDinaControlerInterface->GetModel()); m_PaoDianDockWidget->SetPaoDinaControlerInterface(m_pPaoDinaControlerInterface); m_pPaoDinaControlerInterface->HideAll(); } void MainWindow::SelectLastedFileListItem() { int iRowIndex = m_FileNameDockList->m_Setup.listView->model()->rowCount() - 1; if(iRowIndex > 0) { QModelIndex mi = m_FileNameDockList->m_Setup.listView->model()->index(iRowIndex, 0); m_FileNameDockList->m_Setup.listView->setCurrentIndex(mi); } } FlightPathControler* MainWindow::LoadFlightPath(const QString& fileName) { if(m_FileList.size() <= 0) return 0; std::string layerName = QString::fromLocal8Bit("FlightPathLayer").toStdString(); m_pMap->RemoveLayer(layerName); goto_gis::GeosOnTheOsg* pGOTO = goto_gis::GeosOnTheOsg::Instantiate(); goto_gis::Layer* pLayer = new goto_gis::VectorLayer(0, 0, 1); pGOTO->OpenDataAsLayer(fileName.toStdString(), pLayer); pLayer->CoordTrans(m_pMap->GetCoordinateTransform()); pLayer->Visible(true); pLayer->SetLineWidth(3.0f); pLayer->LayerZ(-20); pLayer->SetLayerColor(osg::Vec4(180/255.0, 0, 0, 1)); pLayer->CreateLayerData(); m_pMap->AddLayer(layerName, pLayer); m_FlightPathControler = static_cast<FlightPathControler*>(pLayer->GetDataProvider()->GetExtendInterface(0)); return m_FlightPathControler; } void MainWindow::FileListScrollButton() { m_FileNameDockList->m_Setup.listView->scrollToBottom(); SelectLastedFileListItem(); } void MainWindow::SetFileListSelectMode( QListView::SelectionMode sm ) { m_FileNameDockList->m_Setup.listView->setSelectionMode(sm); } void MainWindow::StartRealDisplay() { m_MyDisplayRealFile.start(); } void MainWindow::StopRealDispaly() { m_MyDisplayRealFile.stopDispaly(); m_MyDisplayRealFile.wait(); } void MainWindow::DefaultAction() { //QString strName = GetSelectFileName(); if(m_FileList.size() < 2) return; int iMaxIndex = m_FileList.size() - 1; int iFirstIndex = m_FileList.size() - 2; m_SelectReplayFilesList.clear(); m_SelectReplayFilesList.push_back(m_FileList.at(iFirstIndex)); m_SelectReplayFilesList.push_back(m_FileList.at(iMaxIndex)); m_CurrentReplayFileIndex = 1; StartRealDisplay(); } void MainWindow::WaitSlaveThread() { m_MySloveThread.wait(); } void MainWindow::slot_PreviousFile( bool ) { QModelIndex mi = m_FileNameDockList->m_Setup.listView->currentIndex(); if(mi.isValid() ) { int iRowCount = m_pFileListItemModel->rowCount(); int iPreviousRow = mi.row() - 1; if(iPreviousRow >= 0) { QStandardItem* pItem = m_pFileListItemModel->item(iPreviousRow); if(pItem) { QString FileName = pItem->text(); QString strFilePath = m_FileBaseMapToFilePath.value(FileName); m_pControlorInterface->LoadNcFile(QStringToStdString(strFilePath)); m_pControlorInterface->DisplayNcFile(QStringToStdString(strFilePath)); m_FileNameDockList->m_Setup.listView->setCurrentIndex(pItem->index()); SetTimeText(FileName); } } } } void MainWindow::slot_NextFile( bool ) { QModelIndex mi = m_FileNameDockList->m_Setup.listView->currentIndex(); if(mi.isValid() ) { int iRowCount = m_pFileListItemModel->rowCount(); int iNextRow = mi.row() + 1; if(iNextRow < iRowCount) { QStandardItem* pItem = m_pFileListItemModel->item(iNextRow); if(pItem) { QString FileName = pItem->text(); QString strFilePath = m_FileBaseMapToFilePath.value(FileName); m_pControlorInterface->LoadNcFile(QStringToStdString(strFilePath)); m_pControlorInterface->DisplayNcFile(QStringToStdString(strFilePath)); m_FileNameDockList->m_Setup.listView->setCurrentIndex(pItem->index()); SetTimeText(FileName); } } } } void MainWindow::GetSelectTrackBoxList( QVector<cube_data>& boxList ) { QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); for(int i = 0; i < selectBoxes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(i).row()); cube_data cd = g_GlobleConfig.GetCubeFromName(item->text()); if(m_iCurrentLayer >= 0 && m_iCurrentLayer < 20) cd.height = QString::number(g_LayerHeight[m_iCurrentLayer]); boxList.push_back(cd); } } void MainWindow::AutoStartToTrack() { /*QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); for(int i = 0; i < selectBoxes.size(); i++) { slot_TrackListClicked(selectBoxes.at(i)); }*/ slot_ActionTriggered(m_pLoadHidtoryAtion); //QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); //QModelIndex topLeft = m_TrackBoxDockList->m_Setup.listView->model()->index(0, 0, QModelIndex()); //QModelIndex bottomRight = m_TrackBoxDockList->m_Setup.listView->model()->index(5, 2, QModelIndex()); //QItemSelection selection(topLeft, bottomRight); //pISM->select(topLeft, QItemSelectionModel::Select); //pISM->setCurrentIndex(); //QModelIndex index = pISM->currentIndex(); int iSize = m_FileList.size() + 1; m_pProgressDlg = new QProgressDialog(QString::fromLocal8Bit("正在自动跟踪...") , QString::fromLocal8Bit("停止跟踪") , 0, iSize, this); m_pProgressDlg->show(); m_DirectStartTrackAction->MyAction(); m_bAutoSaveResult = true; } void MainWindow::GenerateTrackBox() { PaoDianListDialog pd; pd.LoadSlot(m_pPaoDinaControlerInterface->GetModel()); pd.SetPaoDinaControlerInterface(m_pPaoDinaControlerInterface); pd.exec(); } void MainWindow::CopyTrackBox() { QItemSelectionModel* pISM = m_TrackBoxDockList->m_Setup.listView->selectionModel(); QModelIndexList selectBoxes = pISM->selectedRows(); if(selectBoxes.size() <= 0) { QMessageBox::warning(this, QString::fromLocal8Bit("跟踪框"), QString::fromLocal8Bit("请选择跟踪框。(可多选)")); return; } for(int i = 0; i < selectBoxes.size(); i++) { QStandardItem* item = m_pTrackBoxItemModel->item(selectBoxes.at(i).row()); cube_data cd = g_GlobleConfig.GetCubeFromName(item->text()); if(m_iCurrentLayer >= 0 && m_iCurrentLayer < 20) cd.height = QString::number(g_LayerHeight[m_iCurrentLayer]); cd.name = cd.name + "-copy"; g_GlobleConfig.ConfigCubes(0, cd.name, &cd); FlushCubesList(); g_GlobleConfig.Write(); } } void MainWindow::slot_CopyBox( bool ) { CopyTrackBox(); } #if 0 void loadFileFromTime(const std::string& _filePath , std::vector<std::string>& fileList) { QString strFilePath = QString::fromStdString(_filePath); if(strFilePath.contains("<->")) { QFileInfo fileInfo(strFilePath); QString FileBasename = fileInfo.baseName(); QString FileName = FileBasename; QStringList Times = FileName.split("<->"); QDateTime startTime = QDateTime::fromString(Times[0], "yyyy-MM-dd hh:mm:ss"); QDateTime endTime = QDateTime::fromString(Times[1], "yyyy-MM-dd hh:mm:ss"); QDir dir = fileInfo.absoluteDir(); //qDebug(startTime.toString("yyyyMMddhhmm").toStdString().c_str()); //qDebug(endTime.toString("yyyyMMddhhmm").toStdString().c_str()); //QString strTemp = dir.absolutePath(); QFileInfoList infoList = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot/*, QDir::Time*/); //m_tniv.clear(); for(int i = 0; i < infoList.size(); i++) { QString strFilePath = infoList.at(i).fileName(); QFileInfo info(strFilePath); QString strTemp = info.baseName(); QDateTime currDateTime = QDateTime::fromString("20" + strTemp, "yyyyMMddhhmm"); //strTemp = currDateTime.toString("yyyyMMddhhmmss"); //加载雷达反射 if(startTime <= currDateTime && currDateTime <= endTime) { QString strFilePathAndName = infoList.at(i).absoluteFilePath(); fileList.push_back(strFilePathAndName.toStdString()); //NcFile* pNcFile = new NcFile(strFilePathAndName.toAscii().data()); //m_FileNameToNcFile[strTemp.toStdString()] = pNcFile; //m_FileNames.push_back(strTemp.toStdString()); ////NcFile* pNcFile2 = new NcFile(strFilePathAndName.toAscii().data()); //if(!pNcFile || pNcFile->is_valid() == FALSE) //{ // continue; //} //m_pMakeTexture->loadNcFileToTexture(pNcFile, pTexture, pV3Array); ////QString ffff("E:\\ProjectData\\Image\\%1.png"); ////osg::Image* pImage = osgDB::readImageFile(ffff.arg(i+1).toStdString()); //pRG->AddArray(pV3Array); //pRG->AddImage(pTexture); //m_tniv.push_back(pNcFile); } } } else { //NcFile* pNcFile = new NcFile(_filePath.c_str()); ////m_FileName //m_pMakeTexture->loadNcFileToTexture(pNcFile, pTexture, pV3Array); //pRG->AddArray(pV3Array); //pRG->AddImage(pTexture); //pNcFile->close(); //delete pNcFile; } } #endif void MySlaveThread::run() { //QVector<cube_data> mycubes; //g_GlobleConfig.GetCubes(mycubes); for(/*int i = 0*/; true/*i < m_pMainWindow->m_FileList.size()*/; /*i++*/) { //QString strFile1 = m_pMainWindow->m_FileList.at(i - 1); //QString strFile2 = m_pMainWindow->m_FileList.at(i); //QString strFilePath1 = m_pMainWindow->m_FileBaseMapToFilePath.value(strFile1); //QString strFilePath2 = m_pMainWindow->m_FileBaseMapToFilePath.value(strFile2); QString strFile1; QString strFile2; QString strFilePath1; QString strFilePath2; //Sleep(500); __CHECK__: if(m_pMainWindow->m_TrackState == MainWindow::PAUSE) { Sleep(800); if(m_pMainWindow->m_TrackState == MainWindow::STOP) { break; } goto __CHECK__; } else if(m_pMainWindow->m_TrackState == MainWindow::STOP) { break; } if(m_iMode == 0) { QPair<QString, QString> filePair; int iType = 0; if(m_pMainWindow->m_TrackState == MainWindow::REPLAY) { /*iType = 1; if(!m_pMainWindow->GetTrackFileID(filePair, iType)) { break; }*/ int iR = m_pMainWindow->GetRealTrackFileID(filePair, 1); if(iR != 1 && iR != 0) { Sleep(20000); continue; } } else { int iR = m_pMainWindow->GetRealTrackFileID(filePair); if(iR != 1 && iR != 0) { Sleep(20000); continue; } } strFile1 = filePair.first; strFile2 = filePair.second; strFilePath1 = m_pMainWindow->GetTrackFilePath(strFile1); strFilePath2 = m_pMainWindow->GetTrackFilePath(strFile2); } else { QPair<QString, QString> filePair; int iType = 0; if(m_pMainWindow->m_TrackState == MainWindow::REPLAY) { iType = 1; } if(!m_pMainWindow->GetTrackFileID(filePair, iType)) { break; } strFile1 = filePair.first; strFile2 = filePair.second; strFilePath1 = m_pMainWindow->GetTrackFilePath(strFile1); strFilePath2 = m_pMainWindow->GetTrackFilePath(strFile2); } if(m_pMainWindow->m_TrackState == MainWindow::REPLAY) { Sleep(800); m_pMainWindow->m_pControlorInterface->LoadNcFile(QStringToStdString(strFilePath2)); for(int ii = 0; ii < cubes.size(); ii++) { CUBE_DATE cd; cube_data mycd = cubes.at(ii); MainWindow::ResultRect rr; rr.name = mycd.name; m_pMainWindow->Lock(); m_pMainWindow->m_RectResultSet.push_back(rr); m_pMainWindow->Unlock(); } emit signal_Replay(strFilePath2); } else { for(int ii = 0; ii < cubes.size(); ii++) { CUBE_DATE cd; cube_data mycd = cubes.at(ii); cd.fTargetFstLon = mycd.left_top_lon; cd.fTargetLstLon = mycd.right_bottom_lon; cd.fTargetFstLat = mycd.right_bottom_lat; cd.fTargetLstLat = mycd.left_top_lat; cd.iHeightDown = mycd.height_down.toInt(); cd.iHeightUp = mycd.height_up.toInt(); cd.iHeight = mycd.height.toInt(); for(int iii = 0; iii < mycd.displays.size(); iii++) { if(mycd.displays[iii] == 1) { cd.refs.push_back(m_pMainWindow->m_pControlorInterface->GetValue(iii)); } } ////////////////////////////////传递上一次的结果/////////////////////////// qDebug()<<strFilePath1<<"----------------------------"<<strFilePath2; qDebug()<<mycd.left_top_lon; qDebug()<<mycd.right_bottom_lat; qDebug()<<mycd.right_bottom_lon; qDebug()<<mycd.left_top_lat; ////////////////////////////////////////////////////////////////////////// //m_pMainWindow->m_pControlorInterface->OpenNC(strFilePath2.toStdString()); #if !_DEBUG qDebug()<<"--------------------Start----------------------"; P_TREC_NC_MAP_OUT pOut = m_pMainWindow->m_pControlorInterface->runTrec(QStringToStdString(strFilePath1) , QStringToStdString(strFilePath2), cd); qDebug()<<"---------------------end-----------------------"; #else P_TREC_NC_MAP_OUT pOut = m_pMainWindow->Test(QStringToStdString(strFilePath1) , QStringToStdString(strFilePath2), cd); #endif /////////////////////////////////handle reslut///////////////////////////////////////// //m_pMainWindow->Lock(); osg::Vec3 p1, p2, p3, p4; float fTargetFstLon = pOut->begin()->second.speed.NLon; float fTargetFstLat = pOut->begin()->second.speed.Nlat; float fTargetLstLon = pOut->begin()->second.speed.Elon; float fTargetLstLat = pOut->begin()->second.speed.Elat; mycd.left_top_lon = fTargetFstLon; mycd.right_bottom_lon = fTargetLstLon; mycd.right_bottom_lat = fTargetFstLat; mycd.left_top_lat = fTargetLstLat; cubes[ii] = mycd; qDebug()<<cubes[ii].left_top_lon; qDebug()<<cubes[ii].right_bottom_lat; qDebug()<<cubes[ii].right_bottom_lon; qDebug()<<cubes[ii].left_top_lat; qDebug()<<"----------------------------"; p1.set(fTargetFstLon, fTargetLstLat, 0); p2.set(fTargetLstLon, fTargetLstLat, 0); p3.set(fTargetLstLon, fTargetFstLat, 0); p4.set(fTargetFstLon, fTargetFstLat, 0); /*QString strNameID = QString("%1%2%3").arg(mycd.name, "|", strFilePath2);*/ //qDebug()<<mycd.name<<" : "<<p1.x()<<", "<<p1.y(); //qDebug()<<mycd.name<<" : "<<p3.x()<<", "<<p3.y(); MainWindow::ResultRect rr; rr.name = mycd.name; rr.p1 = p1; rr.p2 = p2; rr.p3 = p3; rr.p4 = p4; rr.color = osg::Vec4(0.4, 0.4, 0.4, 0.4); m_pMainWindow->Lock(); m_pMainWindow->m_RectResultSet.push_back(rr); m_pMainWindow->Unlock(); //m_pMainWindow->m_pControlorInterface->AddRect(mycd.name.toStdString(), p1, p2, p3, p4, osg::Vec4(1.0, 0.0, 0.0, 1.0)); ////////////////////////////////////获得跟踪框中的回波强度图像////////////////////////////////////// float maxHeight = mycd.heightMax, maxDbz = 0, DbzVolume = mycd.volumeMax; int upHeight = getHeightIndex(cd.iHeightUp); int downHeight = getHeightIndex(cd.iHeightDown); QImage* pImage = m_pMainWindow->m_pControlorInterface->ClipNcFile(QStringToStdString(strFilePath2), osg::Vec3(fTargetFstLon, fTargetLstLat, 0), osg::Vec3(fTargetLstLon, fTargetFstLat, 0), 0, upHeight, downHeight,&maxHeight, &DbzVolume, &maxDbz); //--------------新数据编辑------------------------- osg::Vec3 v3WorldP1, v3WorldP2; m_pMainWindow->m_pMap->GetCoordinateTransform()->Transform(osg::Vec3(fTargetFstLon, fTargetLstLat, 0), v3WorldP1); m_pMainWindow->m_pMap->GetCoordinateTransform()->Transform(osg::Vec3(fTargetLstLon, fTargetFstLat, 0), v3WorldP2); //--------------------------------------------------- //--------------------------自定义剖面----------------------- cube_data sectionCD = old_cubes[ii]; if((abs(sectionCD.point1X - sectionCD.point2X) > 0.0001) || (abs(sectionCD.point1Y - sectionCD.point2Y) > 0.0001)) //if(false) { osg::Vec3 v3OldP1(sectionCD.left_top_lon, sectionCD.left_top_lat, 0); osg::Vec3 v3OldWorldP1; m_pMainWindow->m_pMap->GetCoordinateTransform()->Transform(v3OldP1, v3OldWorldP1); osg::Vec3 v3LeftTop(fTargetFstLon, fTargetLstLat, 0); osg::Matrix MTran; MTran.setTrans(osg::Vec3(v3WorldP1.x() - v3OldWorldP1.x(), 0, v3WorldP1.z() - v3OldWorldP1.z())); osg::Vec3 v3SectionP1(sectionCD.point1X, sectionCD.point1Y, 0); osg::Vec3 v3SectionP2(sectionCD.point2X, sectionCD.point2Y, 0); osg::Vec3 v3SectionWorldP1, v3SectionWorldP2; m_pMainWindow->m_pMap->GetCoordinateTransform()->Transform(v3SectionP1, v3SectionWorldP1); m_pMainWindow->m_pMap->GetCoordinateTransform()->Transform(v3SectionP2, v3SectionWorldP2); v3WorldP1 = v3SectionWorldP1 * MTran; v3WorldP2 = v3SectionWorldP2 * MTran; } //----------------------------------------------------------- QImage* pSectionImage = m_pMainWindow->m_pControlorInterface->GetSectionNcFile(QStringToStdString(strFilePath2), v3WorldP1, v3WorldP2); m_pMainWindow->m_ClipNcResultMutex.lock(); QMap<QString, QImage*> clipImage; clipImage.insert(strFile2, pImage); m_pMainWindow->m_ClipNcImageResult.insert(mycd.name, clipImage); //m_pMainWindow->m_ClipNcResultMutex.unlock(); //////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////获得框中的剖面图//////////////////////////////////// //m_pMainWindow->m_ClipNcResultMutex.lock(); QMap<QString, QImage*> SectionImage; SectionImage.insert(strFile2, pSectionImage); m_pMainWindow->m_SectionImageResult.insert(mycd.name, SectionImage); m_pMainWindow->m_ClipNcResultMutex.unlock(); //////////////////////////////////////////////////////////////////////////////////////////////////////////// QMap<QString, QVector<MainWindow::sc>>::iterator finded1 = m_pMainWindow->m_Result1.find(mycd.name); MainWindow::sc sc_value; sc_value.p = pOut->begin()->second.precipitation.precipitation; sc_value.c = pOut->begin()->second.precipitation.content; sc_value.h = maxHeight > 0 ? g_LayerHeight[(int)maxHeight] : 0; sc_value.m = maxDbz; sc_value.v = DbzVolume; if(finded1 != m_pMainWindow->m_Result1.end()) { finded1.value().push_back(sc_value); } else { QVector<MainWindow::sc> rvector; rvector.push_back(sc_value); m_pMainWindow->m_Result1.insert(mycd.name, rvector); } QMap<QString, QMap<int, QVector<MainWindow::ri>>>::Iterator finded2 = m_pMainWindow->m_Result2.find(mycd.name); //先查跟踪框名,再差对应的反射值。 if(finded2 != m_pMainWindow->m_Result2.end()) { for(size_t iii = 0; iii < pOut->begin()->second.ratio.interval.size(); iii++) { QPolygonF plotData3; float fRatio = pOut->begin()->second.ratio.ratio.at(iii); int iV = pOut->begin()->second.ratio.interval.at(iii); int iNum = 0; if(pOut->begin()->second.ratio.number.size() > 0) { iNum = pOut->begin()->second.ratio.number.at(iii); } MainWindow::ri ri_value; ri_value.in = iNum; ri_value.ir = fRatio; QMap<int, QVector<MainWindow::ri>>::iterator findedValue = finded2.value().find(iV); if(findedValue != finded2.value().end()) { findedValue.value().push_back(ri_value); } else { QVector<MainWindow::ri> riVector; riVector.push_back(ri_value); finded2->insert(iV, riVector); } } } else { QMap<int, QVector<MainWindow::ri>> mapValue; for(size_t iii = 0; iii < pOut->begin()->second.ratio.interval.size(); iii++) { QPolygonF plotData3; TREC_OUT* pTREC_OUT = &(pOut->begin()->second); float fRatio = pTREC_OUT->ratio.ratio.at(iii); int iV = pTREC_OUT->ratio.interval.at(iii); int iNum = 0; if(pTREC_OUT->ratio.number.size() > 0) { iNum = pTREC_OUT->ratio.number.at(iii); } MainWindow::ri ri_value; ri_value.in = iNum; ri_value.ir = fRatio; QVector<MainWindow::ri> riVector; riVector.push_back(ri_value); mapValue.insert(iV, riVector); } m_pMainWindow->m_Result2.insert(mycd.name, mapValue); } delete pOut; //m_pMainWindow->Unlock(); } m_pMainWindow->m_pControlorInterface->LoadNcFile(QStringToStdString(strFilePath2)); emit signal_TrackDone(strFilePath2); } //emit signal_ToDeleteOld(strFilePath1); } emit signal_StopTrack(); } void MyDisplayRealFile::run() { while(true) { Sleep(800); m_Mutex.lock(); if(m_Stop) { m_Mutex.unlock(); break; } m_Mutex.unlock(); QPair<QString, QString> filePair; int iR = m_pMainWindow->GetRealTrackFileID(filePair, 1); if(iR != 1 && iR != 0) { //Sleep(20000); continue; } //QString strFile1 = filePair.first; QString strFile2 = filePair.second; //QString strFilePath1 = m_pMainWindow->GetTrackFilePath(strFile1); QString strFilePath2 = m_pMainWindow->GetTrackFilePath(strFile2); m_pMainWindow->m_pControlorInterface->LoadNcFile(QStringToStdString(strFilePath2)); emit signal_Replay(strFilePath2); } } void MyDisplayRealFile::start() { if(g_GlobleConfig.ModeType() != 0) return; m_Mutex.lock(); if(m_Stop == false) { m_Mutex.unlock(); return; } m_Stop = false; m_Mutex.unlock(); QThread::start(); }
a77cb6a4c2f33d4f386f994b54b8a930f6ebbfed
2cc7dd012ec7bf03384c5ad0935424f96a21ca86
/android-P/libhwui/RootRenderNode/RootRenderNode.cpp
19c40bd062438742519add51fd297787c69c2ad1
[]
no_license
clear39/notes
058b4dfb40268747d9cf3456ea71fe88606b8bfb
013211969abfc1be8de85f4766a0826d9a66b344
refs/heads/master
2021-06-06T22:00:06.503892
2021-06-06T15:53:10
2021-06-06T15:53:10
149,075,176
2
0
null
null
null
null
UTF-8
C++
false
false
306
cpp
RootRenderNode.cpp
class RootRenderNode : public RenderNode, ErrorHandler { public: explicit RootRenderNode(JNIEnv* env) : RenderNode() { mLooper = Looper::getForThread(); LOG_ALWAYS_FATAL_IF(!mLooper.get(), "Must create RootRenderNode on a thread with a looper!"); env->GetJavaVM(&mVm); } }
3a3626364e60b2e9d4439478744a6a6365811e42
d9355c70a94ffa21dc7952136e7d26fca66c0d7c
/HashTableUseInbuild.cpp
f9399dbd3d2aa396b687f202030cee92517c82ac
[]
no_license
SakshamGupta08/C-codes
774e4872207211c5da69f004aef164b5b5dbc4c2
e537979978005ff8cb0ea95e180ee060686749d9
refs/heads/master
2021-01-19T15:02:56.649485
2017-08-21T10:11:08
2017-08-21T10:11:08
null
0
0
null
null
null
null
UTF-8
C++
false
false
908
cpp
HashTableUseInbuild.cpp
#include <iostream> #include <unordered_map>//used for hashing using namespace std; void printIntersectonWithDuplicates(int a[],int b[],int n1,int n2){ unordered_map<int,int>map; for(int i=0;i<n1;i++) { map[a[i]]+=1; } for(int i=0;i<n2;i++) { if(map.count(b[i])==1){ if(map[b[i]>0){ cout<<b[i]<<endl; map[b[i]]--; } } } } void printIntersecton(int a[],int b[],int n1,int n2){ unordered_map<int,bool>map; for(int i=0;i<n1;i++){ map[a[i]]=true; ///overloaded by unordered_map,its equivalent to map.add(a[i],true) } for(int i=0;i<n2;i++) { if(map.count(b[i]==1)///equivalent to map.search with return type bool///wont work in case of duplicates { cout<<b[i]<<endl; } } } int main() { }
2cada409a487c589776d680102ba2d3c0dec56c3
ab90653369d091ebe2607675e31123bba66a5840
/Chess/main.cpp
e17204a07b1b115fdd8f65898c148a9a1bfbe903
[]
no_license
cherry900606/Chess
c7ffc2bf96b172b18ee1aa937ec4046ceef77257
e9ffeb64726fd6d9deed39d0538c972fd928b009
refs/heads/main
2023-05-25T14:54:16.851192
2021-06-14T03:58:20
2021-06-14T03:58:20
365,413,020
1
0
null
2021-06-09T02:33:28
2021-05-08T03:48:52
C++
UTF-8
C++
false
false
2,814
cpp
main.cpp
#include <iostream> #include <windows.h> #include "GameManager.h" using namespace std; void welcome(); int main() { welcome(); GameManager gameManager; bool endGame = false; while (!endGame) // menu loop { gameManager.showMenu(); // print game menu //改成string輸入可防呆,避免使用者輸入英文字導致無限迴圈 string cmd; cout << "Command: "; cin >> cmd; if (cmd == "1") // 新遊戲 { // 初始化設定 int setFirstPlayer = 0; cout << "請決定 1)白棋 2)黑棋 先攻: "; cin >> setFirstPlayer; setFirstPlayer--; gameManager.current_player = setFirstPlayer; gameManager.board.resetBoard(); gameManager.game(gameManager.board); } else if (cmd == "2") // 離開遊戲 { endGame = true; } else if (cmd == "3") // 讀檔 { string fileName; cout << "請輸入要讀取的檔案名稱(ex: 1.txt): "; cin >> fileName; ifstream file(fileName); if (!file) cout << "檔案讀取失敗" << endl; else cout << "檔案存在!" << endl; system("pause"); gameManager.board.emptyBoard(); // 把board先清空 file >> gameManager.current_player; // 讀檔ing int x, y, isWhite, type; char icon; while (file >> x >> y) { file >> isWhite >> type >> icon; gameManager.board.board[y][x].piece.isWhiteSide = isWhite; gameManager.board.board[y][x].piece.type = type; gameManager.board.board[y][x].piece.icon = icon; } // 重新遊玩 gameManager.game(gameManager.board); } else // 錯誤指令 { cout << "error command" << endl; system("pause"); cmd.clear(); } } } //動畫 void welcome() { for (int j = 0;j < 8;j++) { for (int i = 0;i <= 2;i++) { cout << endl; } for (int i = 0;i < 10 + j;i++) { cout << " "; } cout << "## ## ######## ## ###### ####### ## ## ########" << endl; for (int i = 0;i < 10 + j;i++) { cout << " "; } cout << "## ## ## ## ## ## ## ## ## ### ### ##" << endl; for (int i = 0;i < 10 + j;i++) { cout << " "; } cout << "## ## ## ## ## ## ## ## #### #### ##" << endl; for (int i = 0;i < 10 + j;i++) { cout << " "; } cout << "## ## ## ###### ## ## ## ## ## ### ## ######" << endl; for (int i = 0;i < 10 + j;i++) { cout << " "; } cout << "## ## ## ## ## ## ## ## ## ## ##" << endl; for (int i = 0;i < 10 + j;i++) { cout << " "; } cout << "## ## ## ## ## ## ## ## ## ## ## ##" << endl; for (int i = 0;i < 10 + j;i++) { cout << " "; } cout << " ### ### ######## ######## ###### ####### ## ## ########" << endl; //cout << "-----Welcome to play chess-----"; Sleep(300); //停三秒 system("cls"); } }
fbb05b832d6fda7dc609a3b131a1f91ca2cb5d41
c61b52bf478945502300ba421cee32b50d0c2e61
/List.cpp
5d8a453c7a8aa500ac22468cd41d9c47fe6e80e8
[]
no_license
cattalin/BigNumber
4f8425fef24a4a7a0767954427c439c849222981
7b8cd38fbe5531f52e85ce0c4123ddec74a5dee2
refs/heads/master
2021-01-13T01:04:02.430818
2017-02-09T11:01:58
2017-02-09T11:01:58
81,440,656
0
0
null
null
null
null
UTF-8
C++
false
false
4,579
cpp
List.cpp
#include "List.h" List::List() { size=0; first=last=NULL; } List::List(const List& l) { copy(l); } List::~List() { //for (int i=0;i<size;i++) ;//delete } void List::pop_back() { if (first==NULL) return; if (first==last) { first=last=NULL; size=0; delete first; return; } Node* aux=first->get_next(); aux->set_prev(NULL); delete first; first=aux; size--; } void List::pop_front() { if (first==NULL) return; if (first==last) { first=last=NULL; size=0; delete first; return; } Node* aux=last->get_prev(); aux->set_next(NULL); delete last; last=aux; size--; } void List::push_front(unsigned short value) { if(value>=10) //cant be smaller than 0 and shouldn't be bigger than 10 { cout<<"ERROR: trying to introduce non-digits\n"; return; } if (first==NULL) //if the list is empty { first=last=new Node(value); size=1; return; } Node* aux=first; first=new Node(value,NULL,aux); aux->set_prev(first); size++; } void List::push_back(unsigned short value) { if(value>=10) { cout<<"ERROR: trying to introduce non-digits\n"; return; } if (first==NULL) { first=last=new Node(value); size=1; return; } Node* aux=new Node(value,last,NULL); last->set_next(aux); last=aux; size++; } List::Size() const { return size; } void List::Show() { if (first==NULL) { cout<<"0"; return; } Node*aux=first; while (aux!=NULL) { cout<<aux->get_info(); aux=aux->get_next(); } } void List::Show_reversed() { if (first==NULL) { cout<<"0"; return; } Node*aux=last; while (aux!=NULL) { cout<<aux->get_info(); aux=aux->get_prev(); } } void List::Show(ostream& out) const { if (first==NULL) { out<<"0"; return; } Node*aux=first; while (aux!=NULL) { out<<aux->get_info(); aux=aux->get_next(); } } void List::Show_reversed(ostream& out) const { if (first==NULL) { out<<"0"; return; } Node*aux=last; while (aux!=NULL) { out<<aux->get_info(); aux=aux->get_prev(); } } void List::remove_useless_zeros() //utility method for maintaining a clean number { if (first==last) { return; } while (last->get_info()==0) { if (last==first)return; pop_front(); } } Node* List::peak(int pos) const //this method offers the possibility to crack the program. TO DO: delete it. it also needs iterator for it uses too much precessing speed. { if (pos<1) return NULL; if (pos>size) return NULL; if (first==NULL) return NULL; Node* aux=first; int i=1; while (i<pos&&aux!=NULL) { i++; aux=aux->get_next(); } //if (aux!=NULL) return aux; } void List::set_info(int pos, unsigned short value) { if (pos<1) return; if (pos>size) return; if (first==NULL) return; Node* aux=first; int i=1; while (i<pos&&aux!=NULL) { i++; aux=aux->get_next(); } if (aux!=NULL) aux->set_info(value); return; } List& List::operator=(const List &l) { copy(l); return *this; } bool List::operator==(const List &l) { if (size!=l.Size()) return false; if (size==0)return true; int i=1; Node* aux1=first; Node* aux2=l.peak(1); while (i<=size&&aux1!=NULL) { if (aux1->get_info()!=aux2->get_info()) return false; i++; aux1=aux1->get_next(); aux2=aux2->get_next(); } return true; } void List::copy(const List& l) { //cout<<" ia cu porc "; size=l.Size(); Node* aux1,* aux2; for (int i=1;i<=size;i++) { if(i==1) { first=new Node(l.peak(i)->get_info(), NULL, NULL); aux1=first; if(i==size) { last=first; } } else if(i==size) { last=new Node(l.peak(i)->get_info(), aux1, NULL); aux1->set_next(last); } else { aux2=new Node(l.peak(i)->get_info(),aux1, NULL); aux1->set_next(aux2); aux1=aux2; } } }
7d0efb3877e4c56b76a663ad716fb217be08a0fd
5e2db6fdccd8eefc10745a9d3bba7c4787a14ace
/src/cli.cpp
3011e70f7300412a450b2ea478232675ae2f1294
[]
no_license
robherley/cs492-fs
c8d61f7a8a2fde80adbc11fe6d2304b4f0412585
3d7fd7a2ae59e974047c5f98cce95c6298ca1e0d
refs/heads/master
2020-03-11T10:33:50.355184
2018-04-25T21:25:50
2018-04-25T21:25:50
129,946,285
0
0
null
null
null
null
UTF-8
C++
false
false
16,084
cpp
cli.cpp
#include "filesys.h" /** * Converts our stack into a string. * (Very lazily) */ string cwd_to_string(stack<Node *> cwd) { stack<Node *> cwd_reversed; while (!cwd.empty()) { cwd_reversed.push(cwd.top()); cwd.pop(); } stringstream ss; while (!cwd_reversed.empty()) { ss << (cwd_reversed.top())->name << '/'; cwd_reversed.pop(); } return ss.str(); } /** * Implementation of cd using a stack as the current directory. */ void cd(stack<Node *> &cwd, queue<string> &tokens) { if (tokens.empty()) { // Just cd is given, go to root while (cwd.size() != 1) cwd.pop(); return; } queue<string> wanted_path = split(tokens.front(), '/'); if (wanted_path.front() == "root") { // absolute path while (cwd.size() != 1) // move to root cwd.pop(); wanted_path.pop(); } while (wanted_path.size()) { string to_dir = wanted_path.front(); if (to_dir == "..") { // if we should move up a folder, pop the cwd stack if (cwd.size() == 1) { cout << "cd: error: root is the highest directory" << endl; break; } else { cwd.pop(); } } else { // we need to go deeper if ((cwd.top())->has_dir(to_dir)) { cwd.push((cwd.top())->dirs.at(to_dir)); } else { // if the folder we want doesn't exist cout << "cd: error: specified folder does not exist" << endl; break; } } wanted_path.pop(); } } /** * Makes a directory node given either the relative path or absolute path */ void mkdir(Node *root, stack<Node *> &cwd, queue<string> &tokens) { // No input after mkdir if (tokens.empty()) { cout << "mkdir: error: no directory specified" << endl; return; } queue<string> wanted_path; queue<string> rel_path = split(tokens.front(), '/'); if ((tokens.front() == "root") && (tokens.size() == 1)) { cout << "mkdir: error: folder already exists" << endl; return; } if (!rel_path.front().size()) { cout << "mkdir: invalid path specified" << endl; return; } if (rel_path.front() != "root") { // if we have a relative path queue<string> partial_path = split(cwd_to_string(cwd), '/'); while (partial_path.size()) { // push all dirs of our cwd wanted_path.push(partial_path.front()); partial_path.pop(); } while (rel_path.size()) { // push all dirs of the relative path wanted_path.push(rel_path.front()); rel_path.pop(); } } else { wanted_path = rel_path; } // Remove root directory from path wanted_path.pop(); Node *curr = root; // Loop over rest of queue, add dirs for each while (!wanted_path.empty()) { if (!curr->has_dir(wanted_path.front())) { // If the folder does not exist, add it. curr->add_dir(wanted_path.front()); } else if (wanted_path.size() == 1) { // If we are at the folder we are trying to add and it already exists, // this is bad an should error cout << "mkdir: error: folder already exists" << endl; } // Set new curr to the next node curr = curr->dirs.at(wanted_path.front()); // Pop the used dir wanted_path.pop(); } return; } /** * Makes a file given either the relative path or absolute path */ void create(Node *root, stack<Node *> &cwd, queue<string> &tokens, LDisk &disk) { // No input after create if (tokens.empty()) { cout << "create: error: no file specified" << endl; return; } queue<string> wanted_path; queue<string> rel_path = split(tokens.front(), '/'); if (!rel_path.front().size()) { cout << "create: invalid path specified" << endl; return; } if (rel_path.front() != "root") { // if we have a relative path queue<string> partial_path = split(cwd_to_string(cwd), '/'); while (partial_path.size()) { // push all dirs of our cwd wanted_path.push(partial_path.front()); partial_path.pop(); } while (rel_path.size()) { // push all dirs of the relative path wanted_path.push(rel_path.front()); rel_path.pop(); } } else { wanted_path = rel_path; } add_file_from_root(root, wanted_path, 0, 0, disk); } /** * Deletes a file or folder given an absolute or relative path */ void delete_thing(Node *root, stack<Node *> &cwd, queue<string> &tokens, LDisk &disk) { // No input after create if (tokens.empty()) { cout << "delete: error: no file/folder specified" << endl; return; } queue<string> wanted_path; queue<string> rel_path = split(tokens.front(), '/'); if ((tokens.front() == "root") && (tokens.size() == 1)) { cout << "delete: error: you can't delete the root bc you don't have root " << "access and you never will. nice try, " << getenv("USER") << endl; return; } if (!rel_path.front().size()) { cout << "delete: invalid path specified" << endl; return; } if (rel_path.front() != "root") { // if we have a relative path queue<string> partial_path = split(cwd_to_string(cwd), '/'); while (partial_path.size()) { // push all dirs of our cwd wanted_path.push(partial_path.front()); partial_path.pop(); } while (rel_path.size()) { // push all dirs of the relative path wanted_path.push(rel_path.front()); rel_path.pop(); } } else { wanted_path = rel_path; } Node *curr = root; wanted_path.pop(); // remove root while (wanted_path.size() != 1) { // if we can't get down the current folder if (!curr->has_dir(wanted_path.front())) { cout << "delete: error: invalid path specified" << endl; return; } // Set new curr to the next node curr = curr->dirs.at(wanted_path.front()); // Pop the used dir wanted_path.pop(); } // At this point, curr is equal to the directory containing the deletion // check for files first if (curr->has_file(wanted_path.front())) { auto blocks_to_free = (curr->files).at(wanted_path.front())->l_file; for (auto block : blocks_to_free) disk.blocks.at(block) = false; (curr->files).erase(wanted_path.front()); return; } // check for folders next if (curr->has_dir(wanted_path.front())) { if ((curr->dirs).at(wanted_path.front())->is_empty()) { (curr->dirs).erase(wanted_path.front()); } else { cout << "delete: error: the specified folder is not empty" << endl; } return; } cout << "delete: error: unable to delete specified paramater" << endl; } /** * Appends bytes to a given a file name */ void append(Node *root, stack<Node *> &cwd, queue<string> &tokens, LDisk &disk, tuple<string, string, int, int> args) { // No input after append if (tokens.empty()) { cout << "append: error: no file specified" << endl; return; } queue<string> wanted_path; queue<string> rel_path = split(tokens.front(), '/'); tokens.pop(); if (tokens.empty()) { cout << "append: error: no bytes specified" << endl; return; } int bytes_wanted; try { bytes_wanted = stoi(tokens.front()); } catch (...) { cout << "append: error: invalid value for bytes" << endl; return; } if (!rel_path.front().size()) { cout << "append: error: invalid path specified" << endl; return; } if (rel_path.front() != "root") { // if we have a relative path queue<string> partial_path = split(cwd_to_string(cwd), '/'); while (partial_path.size()) { // push all dirs of our cwd wanted_path.push(partial_path.front()); partial_path.pop(); } } // push all dirs of the path (besides the file) while (rel_path.size() - 1) { wanted_path.push(rel_path.front()); rel_path.pop(); } // Remove root wanted_path.pop(); Node *curr = root; while (!wanted_path.empty()) { if (!curr->has_dir(wanted_path.front())) { cout << "append: error: specified file does not exist" << endl; return; } curr = (curr->dirs).at(wanted_path.front()); wanted_path.pop(); } if (!curr->has_file(rel_path.front())) { cout << "append: error: specified file does not exist" << endl; return; } File *wanted_file = curr->files.at(rel_path.front()); int leftover_bac = wanted_file->leftover; int overflow = bytes_wanted % get<3>(args); int blocks_to_add = 0; if (wanted_file->leftover) { // if our file has leftover bytes // Find if have room for it in our last block int total_over = (overflow + wanted_file->leftover); if (total_over < get<3>(args)) { // If it fits in our block size wanted_file->leftover = total_over; } else if (total_over == get<3>(args)) { // If it's a perfect fit wanted_file->leftover = 0; } else { // It's greater than our block size, so we need to add a block blocks_to_add++; wanted_file->leftover = total_over % get<3>(args); } } else { wanted_file->leftover = overflow; } if (bytes_wanted < get<3>(args)) { // If the amount of bytes we are trying to add is less than our block size blocks_to_add++; } else { // Add the blocks we need blocks_to_add += ceil((float)(bytes_wanted) / (float)get<3>(args)); } vector<int> added_blocks = disk.alloc(blocks_to_add); if (added_blocks.at(0) == -1) { // Our blocks could not be added (reset the leftover) wanted_file->leftover = leftover_bac; return; } // If everything worked out okay, add the blocks to our lfile for (auto ind : added_blocks) wanted_file->l_file.push_back(ind); // Update timestamp time(&wanted_file->timestamp); } /** * Remove a certain number of bytes from a given file */ void remove_thing(Node *root, stack<Node *> &cwd, queue<string> &tokens, LDisk &disk, tuple<string, string, int, int> args) { // No input after remove if (tokens.empty()) { cout << "remove: error: no file specified" << endl; return; } queue<string> wanted_path; queue<string> rel_path = split(tokens.front(), '/'); tokens.pop(); if (tokens.empty()) { cout << "remove: error: no bytes specified" << endl; return; } int bytes_to_remove; try { bytes_to_remove = stoi(tokens.front()); } catch (...) { cout << "remove: error: invalid value for bytes" << endl; return; } if (!rel_path.front().size()) { cout << "remove: error: invalid path specified" << endl; return; } if (rel_path.front() != "root") { // if we have a relative path queue<string> partial_path = split(cwd_to_string(cwd), '/'); while (partial_path.size()) { // push all dirs of our cwd wanted_path.push(partial_path.front()); partial_path.pop(); } } // push all dirs of the path (besides the file) while (rel_path.size() - 1) { wanted_path.push(rel_path.front()); rel_path.pop(); } // Remove root wanted_path.pop(); Node *curr = root; while (!wanted_path.empty()) { if (!curr->has_dir(wanted_path.front())) { cout << "remove: error: specified file does not exist" << endl; return; } curr = (curr->dirs).at(wanted_path.front()); wanted_path.pop(); } if (!curr->has_file(rel_path.front())) { cout << "remove: error: specified file does not exist" << endl; return; } File *wanted_file = curr->files.at(rel_path.front()); int file_size; if (wanted_file->leftover == 0) { file_size = wanted_file->l_file.size() * get<3>(args); } else if (wanted_file->l_file.size()) { file_size = ((wanted_file->l_file.size() - 1) * get<3>(args)) + wanted_file->leftover; } else { file_size = 0; } // If we are trying to remove more than we have if (file_size < bytes_to_remove) { cout << "remove: error: removing more bytes than present in file" << endl; return; } // If we remove the entire thing, dealloc everything if (file_size == bytes_to_remove) { for (auto n : wanted_file->l_file) disk.blocks.at(n) = false; wanted_file->l_file.clear(); wanted_file->leftover = 0; // Update timestamp time(&wanted_file->timestamp); return; } if (bytes_to_remove <= wanted_file->leftover) { // If the amount to remove is less than our overflow in the current block wanted_file->leftover = (wanted_file->leftover - bytes_to_remove); if (bytes_to_remove == wanted_file->leftover) { // If it's equal, delete the end block disk.blocks.at(wanted_file->l_file.back()) = false; wanted_file->l_file.pop_back(); } // Update timestamp time(&wanted_file->timestamp); return; } else if ((bytes_to_remove < get<3>(args)) && !wanted_file->leftover) { // We have a perfect block (end) and want to remove from it wanted_file->leftover = get<3>(args) - bytes_to_remove; if (bytes_to_remove == get<3>(args)) { // If it's equal, delete the end block disk.blocks.at(wanted_file->l_file.back()) = false; wanted_file->l_file.pop_back(); } // Update timestamp time(&wanted_file->timestamp); return; } else { // We need to remove the overflow and blocks with it. bytes_to_remove += wanted_file->leftover; // add our leftover // Set our new leftover value wanted_file->leftover = bytes_to_remove % get<3>(args); unsigned blocks_to_remove = (bytes_to_remove - wanted_file->leftover) / get<3>(args); if (wanted_file->leftover) { // If we have a leftover, we need an extra block for it blocks_to_remove--; } while (blocks_to_remove) { // Del the last block, free the location in ldisk, and move to the next disk.blocks.at(wanted_file->l_file.back()) = false; wanted_file->l_file.pop_back(); blocks_to_remove--; } // Update timestamp time(&wanted_file->timestamp); } } /** * Little prompt to grab the input. AND IT'S COLORFUL */ string prompt(stack<Node *> cwd) { cout << '\n' << BLUE << getenv("USER") << YELLOW << " | " << GREEN; cout << cwd_to_string(cwd) << endl; cout << MAGENTA << "$ " << RES; string input; getline(cin, input); return input; } /** * Our main program loop. Handles user input based on assignment commands. */ void start_cli(Node *root, tuple<string, string, int, int> args, LDisk &disk) { signal(SIGINT, SIG_IGN); map<string, int> cmds = {{"cd", 0}, {"ls", 1}, {"mkdir", 2}, {"create", 3}, {"append", 4}, {"remove", 5}, {"delete", 6}, {"exit", 7}, {"dir", 8}, {"prfiles", 9}, {"prdisk", 10}}; stack<Node *> cwd; cwd.push(root); bool running = true; while (running) { // Grab our input, split it into a queue of tokens queue<string> tokens = split(prompt(cwd), ' '); if (cmds.find(tokens.front()) == cmds.end()) { cout << "fs: command not found: " << tokens.front() << endl; continue; } int cmd = cmds.at(tokens.front()); tokens.pop(); switch (cmd) { // cd case 0: cd(cwd, tokens); break; // ls case 1: for (auto &dir : (cwd.top())->dirs) cout << GREEN << dir.first << RES << endl; for (auto &file : (cwd.top())->files) cout << YELLOW << file.first << RES << endl; break; // mkdir case 2: mkdir(root, cwd, tokens); break; // create case 3: create(root, cwd, tokens, disk); break; // append case 4: append(root, cwd, tokens, disk, args); break; // remove case 5: remove_thing(root, cwd, tokens, disk, args); break; // delete case 6: delete_thing(root, cwd, tokens, disk); break; // Exit case 7: running = false; cout << "Goodbye!" << endl; break; // Dir case 8: cout << root << endl; break; // prfiles case 9: print_file_info(root, args); break; // prdisk case 10: cout << disk << endl; cout << "Fragmentation: " << get_fragmentation(root, args) << " bytes" << endl; break; default: cout << "Your token val was " << cmd << endl; break; } } }
16615066b30b9e953e14bfc04ddfe2635cf40454
b7248da4df95b2f15ffe646119df3bd1842e0823
/LeetCode/LeetCode/Q0004_MedianOfTwoSortedArray.h
a8b19cb2cd774c607d22bcb20dead88bf278968f
[]
no_license
SeanWuLearner/leetcode_vsstudio
84eb9b4d0a7a4daa086e83bc6cea0d7b87144f9f
85c772776dd286150d3d21cac95686c8941a8109
refs/heads/master
2022-02-19T06:31:25.926708
2019-09-02T14:54:09
2019-09-02T14:54:09
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,667
h
Q0004_MedianOfTwoSortedArray.h
#pragma once #include "DebugUtils.h" #include <vector> #include <climits> #include <algorithm> #pragma region seanwu_1st_summit //class Solution { //public: // double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { // int m = nums1.size(), n = nums2.size(); // int i1 = m / 2; // int i2 = ((m + n) / 2) - i1; // bool cond1, cond2; // // while (true) // { // cond1 = (i2==0 || i1==m)? true : (nums1[i1] >= nums2[i2 - 1]); // cond2 = (i1==0 || i2==n)? true : (nums2[i2] >= nums1[i1 - 1]); // if (cond1 && cond2) // break; // else if (cond1) // { // if (i2 != n) i2++; // if (i1 != 0) i1--; // } // else // { // if (i1 != m) i1++; // if (i2 != 0) i2--; // } // } // // int small1 = (i1 == 0) ? INT_MIN : nums1[i1 - 1]; // int big1 = (i1 == m) ? INT_MAX : nums1[i1]; // int small2 = (i2 == 0) ? INT_MIN : nums2[i2 - 1]; // int big2 = (i2 == n) ? INT_MAX : nums2[i2]; // // if ((m + n) % 2 == 0) //even case // return (max(small1, small2) + min(big1, big2))/ 2.0 ; // else //odd case // return min(big1, big2); // } //}; #pragma endregion #pragma region recursive_manner_from_others class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { int l1 = nums1.size(); int l2 = nums2.size(); return (findMedianSortedArraysCore(nums1, 0, nums2, 0, (l1 + l2 + 1) / 2) + findMedianSortedArraysCore(nums1, 0, nums2, 0, (l1 + l2 + 2) / 2)) / 2.0; } private: int findMedianSortedArraysCore(vector<int>& nums1, int start1, vector<int>& nums2, int start2, int K) { if (start1 >= nums1.size()) return nums2[start2 + K - 1]; if (start2 >= nums2.size()) return nums1[start1 + K - 1]; if (K == 1) return nums1[start1] > nums2[start2] ? nums2[start2] : nums1[start1]; if ((start1 + K / 2 - 1) >= nums1.size()) return findMedianSortedArraysCore(nums1, start1, nums2, start2 + K / 2, K - K / 2); if ((start2 + K / 2 - 1) >= nums2.size()) return findMedianSortedArraysCore(nums1, start1 + K / 2, nums2, start2, K - K / 2); int mid1 = nums1[start1 + K / 2 - 1]; int mid2 = nums2[start2 + K / 2 - 1]; if (mid1 >= mid2) return findMedianSortedArraysCore(nums1, start1, nums2, start2 + K / 2, K - K / 2); else return findMedianSortedArraysCore(nums1, start1 + K / 2, nums2, start2, K - K / 2); } }; #pragma endregion void q0004_tester() { Solution s; vector<int> t1{ 1,3 }; vector<int> t2{ 2 }; cout << s.findMedianSortedArrays(t1, t2) << endl; t1 = { 1, 2 }; t2 = { 3, 4 }; cout << s.findMedianSortedArrays(t1, t2) << endl; t1 = { 1,2,3}; t2 = { 4 }; cout << s.findMedianSortedArrays(t1, t2) << endl; }
582f92b5a724cc4dfeb779f29edc738396887e25
82fa44dbbdaf1c08944d0770f5d34ac252eede0e
/src/BmpEncoder.cpp
fa26742d38faa2159f01dde7417009cb01dd8186
[ "MIT" ]
permissive
GbaLog/wad_packer
c5d13c0ee6c510403ede6ced0caf0ae881a1beb6
212af80a8e1e475221be4b5ec241bd77ec126899
refs/heads/master
2020-05-18T18:43:52.473555
2019-05-03T09:57:02
2019-05-03T09:57:02
184,594,199
7
0
null
null
null
null
UTF-8
C++
false
false
2,666
cpp
BmpEncoder.cpp
#include "BMPEncoder.h" #include "MemWriter.h" #include "MemReader.h" #include "Tracer.h" #include "InetUtils.h" #include <cstring> //----------------------------------------------------------------------------- bool BMPEncoder::encode(const BmpData & bmpData, VecByte & encoded) { encoded.clear(); uint32_t headersSize = sizeof(BmpFileHeader) + sizeof(BmpInfoHeader); uint32_t width = ((bmpData._width + 3) & ~3); uint32_t height = bmpData._height; uint32_t imgSize = width * height; uint32_t fileSize = headersSize + (bmpData._palette.size() * sizeof(Color)) + imgSize; encoded.clear(); encoded.resize(fileSize); BmpFileHeader fileHeader; fileHeader._fileType = ('M' << 8) | ('B'); fileHeader._fileSize = fileSize; fileHeader._dummy1 = 0; fileHeader._dummy2 = 0; fileHeader._dataOffset = headersSize + bmpData._palette.size() * sizeof(Color); MemWriter wr(encoded.data(), encoded.size()); if (wr.writeData(&fileHeader, sizeof(BmpFileHeader)) == false) { TRACE(ERR) << "Can't write BMP file header"; return false; } BmpInfoHeader infoHeader; memset(&infoHeader, 0, sizeof(infoHeader)); infoHeader._headerSize = sizeof(BmpInfoHeader); infoHeader._width = width; infoHeader._height = height; infoHeader._clrPlanes = 1; infoHeader._bitsPerPixel = 8; infoHeader._compressionType = BmpCompressionType::Bmp_BI_RGB; infoHeader._imageSize = imgSize; infoHeader._horizontalResol = 0; infoHeader._verticalResol = 0; infoHeader._clrUsed = 256; infoHeader._importantClrUsed = 0; if (wr.writeData(&infoHeader, sizeof(BmpInfoHeader)) == false) { TRACE(ERR) << "Can't write BMP info header"; return false; } MemReader rd((uint8_t *)bmpData._palette.data(), bmpData._palette.size() * sizeof(Color)); for (int i = 0; i < (int)infoHeader._clrUsed; ++i) { Color clr; if (rd.readData((uint8_t *)&clr, sizeof(Color)) == false) { TRACE(ERR) << "Can't read color from palette, index: " << i; return false; } if (wr.writeData(&clr, sizeof(Color)) == false) { TRACE(ERR) << "Can't write color to BMP file, index: " << i; return false; } } wr = MemWriter(wr.getPos(), wr.getRemainingSize()); const uint8_t * bmpImgData = bmpData._data.data(); bmpImgData += (height - 1) * bmpData._width; for (uint32_t i = 0; i < height; ++i) { wr.shiftFromStart(width * i); wr.writeData(bmpImgData, bmpData._width); bmpImgData -= bmpData._width; } return true; } //-----------------------------------------------------------------------------
445b705852f46bc9c1b00abc2e262e3b4feb5a56
48fd073b72d7bcc105d34fa96d155550cbf6cebb
/game/ECS/ComponentAppearance.cpp
b124580f1c1db64d7e21c5ae840d5f3652d803cc
[]
no_license
King-Coyote/ciso
75fea1be3def8c8b6acda002fdea738f0e91e74e
16b05de382d4f777108b5b2a883a34f70fa3063a
refs/heads/master
2020-04-30T12:58:41.316720
2019-12-08T06:25:45
2019-12-08T06:26:07
176,841,217
0
0
null
null
null
null
UTF-8
C++
false
false
970
cpp
ComponentAppearance.cpp
#include "ComponentAppearance.hpp" #include "ResourceManager.hpp" namespace ci { ComponentAppearance::ComponentAppearance() : Component(-1) {} // TODO should this take responsibility for getting the texture or should the constructor? ComponentAppearance::ComponentAppearance(mun::Table& t, ci::ResourceManager& resourceManager) : Component(t.get<int>("level", 100)) { this->sprite.setTexture(*(resourceManager.getResource<sf::Texture>(t.get<const char*>("filename")))); } ComponentAppearance::ComponentAppearance(mun::Table&& t, ci::ResourceManager& resourceManager) : Component(t.get<int>("level", 100)) { this->sprite.setTexture(*(resourceManager.getResource<sf::Texture>(t.get<const char*>("filename")))); } void ComponentAppearance::setSpritePos(const ci::Transform& transform) { this->sprite.setPosition(sf::Vector2f(transform.x, transform.y)); } const sf::Sprite& ComponentAppearance::getSprite() const { return this->sprite; } }
415fc41a84a61aff62807bfc88b8d9bc37a14957
b0d9c8388aadf7fd6810146da42b3ffbf6cc7c3a
/15. BinarySearch(DnD)/7. painter'sProblem.cpp
f5e683fad31013dd9aa07e1f6e5eddb6370d7793
[]
no_license
iampreetsimar/dsa-practice
fad67d8727c2fd6a79fcf57d61b944860703ec8c
4d3baa1a69dbb13b58b82614065532e73a0ee5bc
refs/heads/master
2022-11-24T16:14:23.391810
2020-07-25T12:52:33
2020-07-25T12:52:33
280,460,546
0
0
null
2020-07-17T20:25:52
2020-07-17T15:29:57
C++
UTF-8
C++
false
false
1,013
cpp
7. painter'sProblem.cpp
#include <iostream> #include <climits> using namespace std; bool isValid(int *l, int k, int n, int mid) { int painter = 1; int bDone = 0; for(int i = 0; i < n; i++) { if(bDone + l[i] > mid) { painter++; bDone = l[i]; if(painter > k) return false; } else bDone += l[i]; } return true; } int timeTaken(int *l, int k, int n) { int res = INT_MIN; int start = l[n - 1]; int end = 0; for(int i = 0; i < n; i++) { end += l[i]; } while(start <= end) { int mid = (start + end) >> 1; if(isValid(l, k, n, mid)) { res = max(res, mid); end = mid - 1; } else start = mid + 1; } return res; } int main() { int k, n; cin>>k>>n; int l[n]; for(int i = 0; i < n; i++) { cin>>l[i]; } cout<<timeTaken(l, k, n); return 0; }
031ffd754ddd0bf5da2e217032f4f6c46f60620e
cfc5cfe708fba31c22b9c68a7726b0cd2c14a6bf
/PPR/ppr21.cpp
6045a784fb607765173241b4bb2ea5bde632ef38
[ "Apache-2.0" ]
permissive
grzegorz2047/UAMRepo
2109e0a5a2b0797a41967643fba499da8784f8f6
639a96a956d25247510478549828aff90651b85e
refs/heads/master
2021-01-19T21:50:31.811474
2017-04-19T08:15:32
2017-04-19T08:15:32
88,711,707
0
0
null
null
null
null
UTF-8
C++
false
false
822
cpp
ppr21.cpp
#include <iostream> #include <string> int doOperation(int num1, int num2, char sign){ int answer = 0; if(sign == '+'){ answer = num1 + num2; } else if(sign == '-'){ answer = num1 - num2; } else if(sign == '*'){ answer = num1 * num2; } return answer; } int main(){ int numOfTests = 0; std::cin >> numOfTests; int temp = numOfTests; int index = 0; while(temp != 0){ int (*wskaznik)(int,int, char); wskaznik = doOperation; int num1, num2 = 0; char sign; std::cin >> num1 >> sign >> num2; if(sign == '+'){ std::cout<<wskaznik(num1, num2, sign); } else if(sign == '-'){ std::cout<<wskaznik(num1, num2, sign); } else if(sign == '*'){ std::cout<<wskaznik(num1, num2, sign); } temp--; } }
1f879e03488ed1260d2f0a23baeec0637d66be6e
339fca53ef4a4a933f0824d6a59eeca00a3ca733
/day10_Advanced_functions/Listing_10.17_Constructor_as_conversion_operator.cpp
eceff169bb50ac4e964a8c230bac6e16d219bc47
[]
no_license
lamnot/Cplusplus
fe1b968bf1de15126ff03bcaeeffe9f83a2426f1
f10bcf6e71cc6b960535d095ce97e8206164d103
refs/heads/master
2022-06-17T19:39:59.365083
2014-12-05T15:02:52
2014-12-05T15:03:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
763
cpp
Listing_10.17_Constructor_as_conversion_operator.cpp
/* * Listing_10.17.cpp * Conversion operator * Convert a USHORT to a Counter using constructor as conversion operator * * Created on: 26 Aug 2014 * Author: cohabo */ /* // Headers and Includes #include<iostream> using namespace std; // Types and Defines typedef unsigned short USHORT; // Class Declarations class Counter { public: Counter(); Counter( USHORT val ); ~Counter() {} USHORT GetItsVal() const { return itsVal; } void SetItsVal( USHORT x ) { itsVal = x; } private: USHORT itsVal; }; // Class Definitions Counter::Counter(): itsVal(0) {} Counter::Counter( USHORT val ) { itsVal = val; } // Main Program int main() { USHORT a = 2; Counter i = a; cout<< "a is " <<a <<endl; cout<< "i is " <<i.GetItsVal() <<endl; } */
710e82ef92857682a7ccab20f9dfafabf0e4be90
901bf145c81ad3391a17dad8973d3d5de6f5545f
/render.hpp
ef58da671974a494e8fd4b6f1fe984bf3913161c
[]
no_license
JonathanGusching/PongCPP
610f001d1bf55bf26fdabd153a153ecbf3a08f5f
45e65e554b6efb2e0328d690439c85341e7675a6
refs/heads/master
2023-09-01T17:02:49.428346
2021-10-11T20:48:29
2021-10-11T20:48:29
416,077,781
0
0
null
null
null
null
UTF-8
C++
false
false
448
hpp
render.hpp
#ifndef RENDER_HPP #define RENDER_HPP #define M_PI 3.1415 #define M_DELTA 0.0001f #include <cmath> #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> void glRenderCircle(GLfloat centre_x,GLfloat centre_y, GLfloat radius) { glBegin(GL_TRIANGLE_FAN); //First square GLfloat angle=0.0f; while(angle<2*M_PI) { glVertex3f(centre_x+radius*cos(angle),centre_y+radius*sin(angle),0.0f); angle+=M_PI*M_DELTA; } glEnd(); } #endif
d0df30b88e9ae27053287fa8891ce562bb13a607
8d4e62cea5805132c55518a08bf7aa129126ddde
/Compiler 1.cpp
23ccdbf883b8ae06acfdb12e0fa3ec09c8bdc706
[ "MIT" ]
permissive
xo0ps/CompilerSample
5a1eb31a4b56a9cafd3fa8e24e0a2b1c1e2488f5
008f4bd4730b905e77f490bba6e9a13f02a8abee
refs/heads/master
2021-05-14T01:25:19.853599
2018-01-07T13:00:48
2018-01-07T13:00:48
116,565,623
1
0
null
null
null
null
UTF-8
C++
false
false
32,153
cpp
Compiler 1.cpp
#include <iostream> #include <cstring> #include <stdlib.h> #include "Compiler.h" #include "Grammer.h" #define log #define windows #ifdef windows #include <windows.h> //use it on windows #else #include <pthread.h> //use it on linux #endif Compiler::Compiler() { #ifdef log out.open("logger.txt"); #endif } Compiler::~Compiler() { #ifdef log out.close(); #endif } void Compiler::help() { for( int i = 0 ; i < 20 ; i++ ) std::cout<<std::endl; std::cout<<"Welcome to my Compiler"<<std::endl; std::cout<<"Your are allowed to use the following characters:"<<std::endl; std::cout<<"Characters A-Z for Non-Terminals and a-z for Terminals,"<<std::endl; std::cout<<"-> for up to down navigation and must be the second-third characters,"<<std::endl; std::cout<<"| for division,"<<std::endl; std::cout<<"0 for Epsilon."<<std::endl; std::cout<<"Do not use white spaces."<<std::endl; std::cout<<"Start first Grammer with S."<<std::endl; std::cout<<"Start each Grammer with Non-Terminals."<<std::endl; std::cout<<"Enter END to finish the Grammers."<<std::endl; std::cout<<"Enter NEW to correct the last entered Grammer."<<std::endl; std::cout<<std::endl; } void Compiler::getInput() { std::cout<<"Please Enter your Grammers:"<<std::endl; std::string s; int nr_grammers = 1; m_grammers_container.clear(); while ( nr_grammers <= 26 ) { std::getline(std::cin,s); if( s.size() > 200 ) { std::cout<<"Grammer is too long. Enter something less than 200 characters."<<std::endl; continue; } if( s == "end" || s == "END" ) { std::cout<<"Grammers Entered Successfully."<<std::endl; break; } if( s == "new" || s == "NEW" ) { removeLastGrammer(); std::cout<<"Last Grammer is removed. Enter another Grammer."<<std::endl; continue; } if( validate(s , nr_grammers) ) { addToGrammer(s); nr_grammers++; } else { std::cout<<"Grammer Not Allowed. Enter a Correct Grammer!"<<std::endl; } } #ifdef log out<<"m_grammers_container in getInput()"<<std::endl; for( unsigned int i = 0 ; i < m_grammers_container.size() ; i++ ) out<<m_grammers_container[i]<<std::endl; #endif } bool Compiler::validate(std::string s , int nr_grammers ) { if( s.size() < 4 ) return false; if( s[ s.size() - 1 ] == '|' ) return false; if( nr_grammers == 1 ) { if( s[0] != 'S' ) return false; } if( ! ( s[0] >= 'A' && s[0] <= 'Z' ) ) return false; if( ! ( s[1] == '-' && s[2] == '>' ) ) return false; s.erase( 0 , 3 ); bool break_flag = false; while( true ) { size_t pos = s.find_first_of('|'); if( pos == std::string::npos ) break_flag = true; std::string ss = ( break_flag ) ? s : s.substr( 0 , pos ); { for( unsigned int i = 0 ; i < ss.size() ; i++ ) { if( ss[i] >= 'a' && ss[i] <= 'z' ) continue; if( ss[i] >= 'A' && ss[i] <= 'Z' ) continue; if( ss.size() == 1 && ss[i] == '0' ) continue; return false; } } if( break_flag ) break; s.erase( 0 , pos + 1 ); } return true; } void Compiler::addToGrammer(std::string s) { m_grammers_container.push_back(s); } void Compiler::createGrammers() { for( unsigned int iter = 0 ; iter < m_grammers_container.size() ; iter++ ) { Grammer g; g.leftSide = m_grammers_container[iter][0]; std::string line = m_grammers_container[iter]; line.erase( 0 , 3 ); while( true ) { size_t pos = line.find_first_of('|'); if( pos == std::string::npos ) break; std::string rightSide = line.substr( 0 , pos ); g.rightSides.push_back( rightSide ); line.erase( 0 , pos + 1 ); } g.rightSides.push_back( line ); g.containsEpsilon = false; g.leftFactoring = false; g.leftRecursion = false; std::vector< char >first_terms; for( unsigned int i = 0 ; i < g.rightSides.size() ; i++ ) { if( g.rightSides[i] == "0" ) g.containsEpsilon = true; if( g.rightSides[i][0] == g.leftSide ) g.leftRecursion = true; first_terms.push_back( g.rightSides[i][0] ); } bool break_flag = false; for( unsigned int i = 0 ; i < first_terms.size() - 1 ; i++ ) { if( break_flag ) break; for( unsigned int j = i + 1 ; j < first_terms.size() ; j++ ) { if( first_terms[i] == first_terms[j] ) { g.leftFactoring = true; break_flag = true; break; } } } m_grammers.push_back( g ); } #ifdef log out<<"\nm_grammers in createGrammers()"<<std::endl; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { out<<std::endl; out<<m_grammers[i].leftSide<<"\t"; for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) out<<m_grammers[i].rightSides[j]<<"\t"; m_grammers[i].containsEpsilon ? out<<"true\t" : out<<"false\t"; m_grammers[i].leftRecursion ? out<<"true\t" : out<<"false\t"; m_grammers[i].leftFactoring ? out<<"true" : out<<"false"; } out<<std::endl; #endif } void Compiler::makeGrammerLL1() { if( ! areLeftSidesUnique() ) makeUniqueLeftSides(); omitRepeatedVariables(); recheckGrammers( "makeUniqueLeftSides" ); if( canRemoveLeftRecursion() ) makeWithoutLeftRecursion(); omitRepeatedVariables(); recheckGrammers( "makeWithoutLeftRecursion" ); if( findNullVariables() ) makeWithoutEpsilon(); omitRepeatedVariables(); recheckGrammers( "makeWithoutEpsilon" ); insertSingleNonTerminals(); omitRepeatedVariables(); recheckGrammers( "insertSingleNonTerminals" ); insertSingleTerminals(); omitRepeatedVariables(); recheckGrammers( "insertSingleTerminals" ); omitRemovedLeftSides(); omitRepeatedVariables(); recheckGrammers( "omitRemovedLeftSides" ); //insertAllTermsInS(); //omitRepeatedVariables(); //recheckGrammers( "insertAllTermsInS" ); if( canLeftFactoring() ) makeWithLeftFactoring(); //omitRepeatedVariables(); //recheckGrammers( "makeWithLeftFactoring" ); } void Compiler::omitRepeatedVariables() { for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() - 1 ; j++ ) { for( unsigned int k = j + 1 ; k < m_grammers[i].rightSides.size() ; k++ ) { if( m_grammers[i].rightSides[j] == m_grammers[i].rightSides[k] ) { m_grammers[i].rightSides.erase( m_grammers[i].rightSides.begin() + k ); k--; } } } } } void Compiler::omitRemovedLeftSides() { char leftSides[ m_grammers.size() ]; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { leftSides[i] = m_grammers[i].leftSide; } for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) { for( unsigned int iter = 0 ; iter < m_grammers[i].rightSides[j].length() ; iter++ ) { char this_char = m_grammers[i].rightSides[j][iter]; if( this_char >= 'A' && this_char <= 'Z' ) { bool found = false; for( unsigned int counter = 0 ; counter < m_grammers.size() ; counter++ ) { if( leftSides[counter] == this_char ) { found = true; break; } } if( ! found ) { m_grammers[i].rightSides[j] = ""; } } } } } } bool Compiler::canLeftFactoring() { for( unsigned int iter = 0 ; iter < m_grammers.size() ; iter++ ) { if( m_grammers[iter].leftFactoring ) return true; } return false; } void Compiler::insertSingleTerminals() { while( true ) { bool changed = false; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].leftSide == 'S' ) continue; for( unsigned int iter1 = 0 ; iter1 < m_grammers[i].rightSides.size() ; iter1++ ) { if( m_grammers[i].rightSides[iter1].size() != 1 ) continue; char rightside = m_grammers[i].rightSides[iter1][0]; if( rightside >= 'a' && rightside <= 'z' ) { char leftSide = m_grammers[i].leftSide; for( unsigned int j = 0 ; j < m_grammers.size() ; j++ ) { if( m_grammers[j].leftSide != leftSide ) { for( unsigned int k = 0 ; k < m_grammers[j].rightSides.size() ; k++ ) { std::string old_variable = m_grammers[j].rightSides[k]; char * c_old_variable = new char[ old_variable.length() + 1 ]; std::strcpy( c_old_variable , old_variable.c_str() ); for( unsigned int iter = 0 ; iter < old_variable.length() + 1 ; iter++ ) { if( c_old_variable[ iter ] == leftSide ) { c_old_variable[ iter ] = '1'; std::string new_variable( c_old_variable ); size_t pos = new_variable.find_first_of( '1' ); std::string rs; rs += rightside; new_variable.replace( pos , 1 , rs ); m_grammers[j].rightSides.push_back( new_variable ); c_old_variable[ iter ] = leftSide; changed = true; } } delete[] c_old_variable; } } } m_grammers[i].rightSides[iter1] = ""; } } } if( ! changed ) break; } } void Compiler::insertSingleNonTerminals() { for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].leftSide == 'S' ) continue; for( unsigned int iter = 0 ; iter < m_grammers[i].rightSides.size() ; iter++ ) { if( m_grammers[i].rightSides[iter].size() != 1 ) continue; char rightSide = m_grammers[i].rightSides[iter][0]; if( rightSide >= 'A' && rightSide <= 'Z' ) { for( unsigned int j = 0 ; j < m_grammers.size() ; j++ ) { if( m_grammers[j].leftSide == rightSide ) { m_grammers[i].rightSides[iter] = ""; for( unsigned int k = 0 ; k < m_grammers[j].rightSides.size() ; k++ ) m_grammers[i].rightSides.push_back( m_grammers[j].rightSides[k] ); m_grammers.erase( m_grammers.begin() + j ); break; } } } } } } void Compiler::insertAllTermsInS() { for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].leftSide != 'S' ) continue; for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) //this is S { std::string this_variable = m_grammers[i].rightSides[j]; for( unsigned int k = 0 ; k < this_variable.size() ; k++ ) { char this_char = this_variable[k]; if( this_char >= 'a' && this_char <= 'z' ) continue; for( unsigned int l = 0 ; l < m_grammers.size() ; l++ ) { if( this_char != m_grammers[l].leftSide ) continue; for( unsigned int m = 0 ; m < m_grammers[l].rightSides.size() ; m++ ) { std::string new_variable = this_variable; if( k != 0 && this_variable[k-1] == m_grammers[l].rightSides[m][0] ) continue; new_variable.replace( k , m_grammers[l].rightSides[m].length() , m_grammers[l].rightSides[m] ); m_grammers[i].rightSides.push_back( new_variable ); } } } } } for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].leftSide != 'S' ) { m_grammers.erase( m_grammers.begin() + i ); i--; } } } bool Compiler::findNullVariables() { m_grammers2 = m_grammers; bool found = false; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].containsEpsilon ) { m_null_variables.push_back( m_grammers[i].leftSide ); found = true; } } /* for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].containsEpsilon ) continue; for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) { if( m_grammers[i].rightSides[j].size() == m_null_variables.size() ) { char nulls[ m_null_variables.size() ]; char rightnulls[ m_null_variables.size() ]; for( unsigned int counter = 0 ; counter < m_null_variables.size() ; counter++ ) { nulls[counter] = m_null_variables[counter]; rightnulls[counter] = m_grammers[i].rightSides[counter]; } for( unsigned int counter = 0 ; counter < m_null_variables.size() - 1 ; counter++ ) { for( unsigned int counter2 = counter + 1 ; counter2 < m_null_variables.size() ; counter2++ ) { if( nulls[counter] > nulls[counter2] ) { char tmp = nulls[counter]; nulls[counter] = nulls[counter2]; nulls[counter2] = tmp; } if( rightnulls[counter] > rightnulls[counter2] ) { char tmp = rightnulls[counter]; rightnulls[counter] = rightnulls[counter2]; rightnulls[counter2] = tmp; } } } bool must_add = true; for( unsigned int counter = 0 ; counter < m_null_variables.size() ; counter++ ) { if( nulls[counter] != rightnulls[counter] ) must_add = false; } } } } */ return found; } bool Compiler::canRemoveLeftRecursion() { bool found = false; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) { if( m_grammers[i].rightSides[j][0] == m_grammers[i].leftSide ) { m_left_recursion_variables.push_back( m_grammers[i].leftSide ); found = true; } } } return found; } void Compiler::recheckGrammers( std::string method_name ) { for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) { if( m_grammers[i].rightSides[j] == "" || m_grammers[i].rightSides[j] == " " ) { m_grammers[i].rightSides.erase( m_grammers[i].rightSides.begin() + j ); j--; } } } for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].rightSides.size() == 0 ) { m_grammers.erase( m_grammers.begin() + i ); i--; } } for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { m_grammers[i].containsEpsilon = false; m_grammers[i].leftRecursion = false; m_grammers[i].leftFactoring = false; std::vector< char >first_terms; for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) { if( m_grammers[i].rightSides[j] == "0" ) m_grammers[i].containsEpsilon = true; if( m_grammers[i].rightSides[j][0] == m_grammers[i].leftSide ) m_grammers[i].leftRecursion = true; first_terms.push_back( m_grammers[i].rightSides[j][0] ); } bool break_flag = false; for( unsigned int iter = 0 ; iter < first_terms.size() - 1 ; iter++ ) { if( break_flag ) break; for( unsigned int j = iter + 1 ; j < first_terms.size() ; j++ ) { if( first_terms[iter] == first_terms[j] ) { m_grammers[i].leftFactoring = true; break_flag = true; break; } } } } #ifdef log out<<"\nm_grammers in "<<method_name<<"()"<<std::endl; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { out<<std::endl; out<<m_grammers[i].leftSide<<"\t"; for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) out<<m_grammers[i].rightSides[j]<<"\t"; m_grammers[i].containsEpsilon ? out<<"true\t" : out<<"false\t"; m_grammers[i].leftRecursion ? out<<"true\t" : out<<"false\t"; m_grammers[i].leftFactoring ? out<<"true" : out<<"false"; } out<<std::endl; #endif } void Compiler::waiting( int type ) { switch (type) { case PARSING: std::cout<<"Grammer is being Parsed!"<<std::endl; std::cout<<"Please Wait"; break; case LL1_CALCULATING: std::cout<<"Grammer is being LL(1)!"<<std::endl; std::cout<<"Please Wait"; break; default: std::cout<<"Something is being Processed!"<<std::endl; std::cout<<"Please Wait"; break; } for( int i = 0 ; i < 3 ; i++ ) { #ifdef windows //Sleep(1000); //windows #else //sleep(1); //linux #endif std::cout<<"."; } std::cout<<std::endl; } bool Compiler::isGrammerLL1() { createGrammers(); //if( ! areLeftSidesUnique() ) // return false; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].containsEpsilon ) return false; if( m_grammers[i].leftFactoring ) return false; if( m_grammers[i].leftRecursion ) return false; } return true; } bool Compiler::areLeftSidesUnique() { for( unsigned int i = 0 ; i < m_grammers.size() - 1 ; i++ ) { for( unsigned int j = i + 1 ; j < m_grammers.size() ; j++ ) { if( m_grammers[i].leftSide == m_grammers[j].leftSide ) return false; } } return true; } void Compiler::makeUniqueLeftSides() { for( unsigned int i = 0 ; i < m_grammers.size() - 1 ; i++ ) { for( unsigned int j = i + 1 ; j < m_grammers.size() ; j++ ) { if( m_grammers[i].leftSide == m_grammers[j].leftSide ) { for( unsigned int k = 0 ; k < m_grammers[j].rightSides.size() ; k++ ) { m_grammers[i].rightSides.push_back( m_grammers[j].rightSides[k] ); } m_grammers.erase( m_grammers.begin() + j ); j--; } } } } void Compiler::outputFirsts() { std::cout<<"Firsts are as Below:"<<std::endl; std::vector< std::pair< char , std::vector< std::string > > >firsts; for( unsigned int i = 0 ; i < m_grammers2.size() ; i++ ) { char leftSide = m_grammers[i].leftSide; std::vector< std::string >firstss; for( unsigned int j = 0 ; j < m_grammers2[i].rightSides.size() ; j++ ) { std::string this_first = findFirstOfThisVariable( m_grammers2.rightSides[j] ); firstss.push_back( this_first ); } firsts.push_back( std::make_pair( leftSide , firstss ) ); } for( unsigned int i = 0 ; i < firsts.size() ; i++ ) { std::cout<<"First("<<firsts[i].first<<")={"; for( unsigned int j = 0 ; j < firsts[i].second.size() ; j++ ) { std::cout<<firsts[i].second[j]; if( j != firsts[i].second.size() - 1 ) std::cout<<","; } std::cout<<"}"<<std::endl; } } void Compiler::outputFollows() { std::cout<<"Follows are as Below:"<<std::endl; std::vector< std::pair< char , std::vector< std::string > > >follows; for( unsigned int i = 0 ; i < m_grammers2.size() ; i++ ) { char leftSide = m_grammers[i].leftSide; std::vector< std::string >followss; for( unsigned int j = 0 ; j < m_grammers2[i].rightSides.size() ; j++ ) { std::string this_first = findFollowsOfThisVariable( m_grammers2.rightSides[j] ); followss.push_back( this_first ); } follows.push_back( std::make_pair( leftSide , followss ) ); } for( unsigned int i = 0 ; i < follows.size() ; i++ ) { std::cout<<"Follow("<<follows[i].first<<")={"; for( unsigned int j = 0 ; j < follows[i].second.size() ; j++ ) { std::cout<<follows[i].second[j]; if( j != follows[i].second.size() - 1 ) std::cout<<","; } std::cout<<"}"<<std::endl; } } void Compiler::outputLL1() { std::cout<<"LL(1) Grammer is as Below:"<<std::endl; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { std::cout<<m_grammers[i].leftSide<<"->"; for( unsigned int j = 0 ; j < m_grammers[i].rightSides.size() ; j++ ) { std::cout<<m_grammers[i].rightSides[j]; if( j != m_grammers[i].rightSides.size() - 1 ) std::cout<<"|"; } std::cout<<std::endl; } std::cout<<std::endl; } void Compiler::outputParsingTable() { } void Compiler::makeWithoutEpsilon() { for( unsigned int i = 0 ; i < m_null_variables.size() ; i++ ) { char this_null_var = m_null_variables[i]; //here we delete 0 from each grammer for( unsigned int j = 0 ; j < m_grammers.size() ; j++ ) { if( m_grammers[j].leftSide == this_null_var ) { for( unsigned int k = 0 ; k < m_grammers[j].rightSides.size() ; k++ ) { if( m_grammers[j].rightSides[k] == "0" ) { m_grammers[j].rightSides.erase( m_grammers[j].rightSides.begin() + k ); k--; } } } } //here we insert 0 to each another grammers for( unsigned int j = 0 ; j < m_grammers.size() ; j++ ) { for( unsigned int k = 0 ; k < m_grammers[j].rightSides.size() ; k++ ) { std::string old_variable = m_grammers[j].rightSides[k]; char * c_old_variable = new char[ old_variable.length() + 1 ]; std::strcpy( c_old_variable , old_variable.c_str() ); for( unsigned int iter = 0 ; iter < old_variable.length() + 1 ; iter++ ) { if( c_old_variable[ iter ] == this_null_var ) { c_old_variable[ iter ] = '1'; std::string new_variable( c_old_variable ); size_t pos = new_variable.find_first_of( '1' ); new_variable.replace( pos , 1 , "" ); m_grammers[j].rightSides.push_back( new_variable ); c_old_variable[ iter ] = this_null_var; } } for( unsigned int iter = 0 ; iter < old_variable.length() + 1 ; iter++ ) { if( c_old_variable[ iter ] == this_null_var ) { c_old_variable[ iter ] = '1'; std::string new_variable( c_old_variable ); size_t pos = new_variable.find_first_of( '1' ); new_variable.replace( pos , 1 , "" ); m_grammers[j].rightSides.push_back( new_variable ); } } delete[] c_old_variable; } } } m_null_variables.clear(); } void Compiler::makeWithoutLeftRecursion() { for( unsigned int i = 0 ; i < m_left_recursion_variables.size() ; i++ ) { char this_left_recursion_char = m_left_recursion_variables[i]; for( unsigned int j = 0 ; j < m_grammers.size() ; j++ ) { if( m_grammers[j].leftSide == this_left_recursion_char ) { std::vector< std::string > rightSides = m_grammers[j].rightSides; m_grammers[j].rightSides.clear(); char newgrammerleftside = findNewLeftSideChar(); if( newgrammerleftside == '0' ) { std::cout<<"LeftSide Character Limitation Exceeded. Programm Will now Close!"<<std::endl; exit(1); } for( unsigned int k = 0 ; k < rightSides.size() ; k++ ) { if( rightSides[k] == "0" ) { std::string newgrammerstr = ""; newgrammerstr += newgrammerleftside; m_grammers[j].rightSides.push_back( newgrammerstr ); m_grammers[j].rightSides.push_back( "0" ); continue; } if( rightSides[k][0] == this_left_recursion_char ) { std::string firstrightside = rightSides[k]; firstrightside = firstrightside.erase(0,1) + this_left_recursion_char; Grammer g; g.leftSide = newgrammerleftside; g.rightSides.push_back( firstrightside ); g.rightSides.push_back("0"); m_grammers.push_back(g); continue; } std::string newrightside = rightSides[k]; newrightside += newgrammerleftside; m_grammers[j].rightSides.push_back( newrightside ); } } } } m_left_recursion_variables.clear(); } void Compiler::makeWithLeftFactoring() { //inja ro anjam nadadam /* for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( ! m_grammers[i].leftFactoring ) continue; std::vector< std::string >rightSides = m_grammers[i].rightSides; std::vector< std::vector< std::string > >selection; for( unsigned int j = 0 ; j < rightSides.size() - 1 ; j++ ) { std::vector< std::string >vect; for( unsigned int k = j + 1 ; k < rightSides.size() ; k++ ) { if( rightSides[j][0] == rightSides[k][0] ) { vect.push_back( ); } } selection.push_back( vect ); } } */ } char Compiler::findNewLeftSideChar() { const char available_left_sides[] = { 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , 'S' , 'T' , 'U' , 'V' , 'W' , 'X' , 'Y' , 'Z' }; const unsigned int available_left_sides_number = 26; if( m_grammers.size() >= available_left_sides_number ) return '0'; char current_left_sides [ m_grammers.size() ]; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) current_left_sides[i] = m_grammers[i].leftSide; for( unsigned int i = 0 ; i < m_grammers.size() - 1 ; i++ ) { for( unsigned int j = i + 1 ; j < m_grammers.size() ; j++ ) { if( current_left_sides[i] > current_left_sides[j] ) { char tmp = current_left_sides[i]; current_left_sides[i] = current_left_sides[j]; current_left_sides[j] = tmp; } } } for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( current_left_sides[i] != available_left_sides[i] ) return available_left_sides[i]; } return '0'; } void Compiler::outputWhyNotLL1() { int counter = 1; std::cout<<"Because Grammer has:"<<std::endl; for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].containsEpsilon ) { std::cout<<counter<<". Epsilons"<<std::endl; counter++; break; } } for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].leftFactoring ) { std::cout<<counter<<". Left Factorings"<<std::endl; counter++; break; } } for( unsigned int i = 0 ; i < m_grammers.size() ; i++ ) { if( m_grammers[i].leftRecursion ) { std::cout<<counter<<". Left Recursions"<<std::endl; break; } } std::cout<<std::endl; } void Compiler::removeLastGrammer() { m_grammers_container.pop_back(); }
7c097ddbb4de014a610b6e78dd9beb7e0efa42d2
b05c28d9eb00c16b3afe2155a360291805d08834
/egl_probe/query_devices.cpp
d62e5094c5f4f1191dd459dc898071541db1ae8a
[ "MIT" ]
permissive
StanfordVL/egl_probe
83e60ba7ea76ed04dd06c9776c5a876189f657ed
3ddf90db69264de2c621af567bfc557849126cff
refs/heads/master
2023-06-23T20:24:42.215439
2021-07-16T08:47:48
2021-07-16T08:47:48
320,106,703
2
2
MIT
2021-07-16T08:47:49
2020-12-09T23:36:31
C
UTF-8
C++
false
false
2,933
cpp
query_devices.cpp
// from https://github.com/erwincoumans/egl_example by Erwin Coumans // adapted by Fei Xia (feixia@stanford.edu) #include <stdio.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <unistd.h> #ifdef USE_GLAD #include <glad/egl.h> #else #include <EGL/egl.h> #include <EGL/eglext.h> #endif #include <glad/gl.h> struct EGLInternalData2 { bool m_isInitialized; int m_windowWidth; int m_windowHeight; int m_renderDevice; EGLBoolean success; EGLint num_configs; EGLConfig egl_config; EGLSurface egl_surface; EGLContext egl_context; EGLDisplay egl_display; EGLInternalData2() : m_isInitialized(false), m_windowWidth(0), m_windowHeight(0) {} }; int main(){ #ifndef USE_GLAD PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT = (PFNEGLQUERYDEVICESEXTPROC) eglGetProcAddress("eglQueryDevicesEXT"); if(!eglQueryDevicesEXT) { printf("ERROR: Extension eglQueryDevicesEXT not available"); return(-1); } PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYEXTPROC)eglGetProcAddress("eglGetPlatformDisplayEXT"); if(!eglGetPlatformDisplayEXT) { printf("ERROR: Extension eglGetPlatformDisplayEXT not available"); return(-1); } #endif int m_windowWidth; int m_windowHeight; int m_renderDevice; EGLBoolean success; EGLint num_configs; EGLConfig egl_config; EGLSurface egl_surface; EGLContext egl_context; EGLDisplay egl_display; m_windowWidth = 256; m_windowHeight = 256; m_renderDevice = -1; int verbosity = 20; EGLint egl_config_attribs[] = {EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_DEPTH_SIZE, 8, EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, EGL_RENDERABLE_TYPE, EGL_OPENGL_BIT, EGL_NONE}; EGLint egl_pbuffer_attribs[] = { EGL_WIDTH, m_windowWidth, EGL_HEIGHT, m_windowHeight, EGL_NONE, }; EGLInternalData2* m_data = new EGLInternalData2(); // Load EGL functions #ifdef USE_GLAD int egl_version = gladLoaderLoadEGL(NULL); if(!egl_version) { fprintf(stderr, "INFO: Probing, EGL cannot run on this device\n"); exit(EXIT_FAILURE); }; #endif // Query EGL Devices const int max_devices = 32; EGLDeviceEXT egl_devices[max_devices]; EGLint num_devices = 0; EGLint egl_error = eglGetError(); if (!eglQueryDevicesEXT(max_devices, egl_devices, &num_devices) || egl_error != EGL_SUCCESS) { printf("WARN: eglQueryDevicesEXT failed.\n"); m_data->egl_display = EGL_NO_DISPLAY; } printf("%d", num_devices); //This prints to a file that will be read in python to know the index of the device to use return 0; }
fc78002269d4d142dd2dc3f2c5abbfbe2e754839
1355b290d177ee5ac5b705d17a8d7713076d20c6
/Quiz2/quiz2-2-5.cpp
63e7cbb45dba4782862126d039691ea4507fc940
[]
no_license
Ventura-CS-V13-Spring2021/assignments-mariewolf
e6ae856df940cb9b22e602ed51572814a42cf0b8
934671ba96862661f695513aa7876e94774891cf
refs/heads/main
2023-04-27T03:35:58.615575
2021-05-18T20:14:28
2021-05-18T20:14:28
337,493,521
0
0
null
null
null
null
UTF-8
C++
false
false
553
cpp
quiz2-2-5.cpp
#include <iostream> using namespace std; int main() { int range1, range2; bool flag = false; cout << "Enter two integer values: "; cin >> range1 >> range2; cout << "\nThe prime numbers in the range are: "; if (range1 >= range2) { cout << "\nInput error: First input must be less than the second.\n"; main(); } for (int i=range1; i<=range2; i++) { for (int j=2; j<i; j++) { if (i%j==0) { flag=true; break; } else{flag=false;} } if (flag==false) {cout << i << " ";} } return 0; }
648331438ff22bb29ecdf22f3d7389ecd0e949a4
3009c4aec4a2a587be1a76358cfe42b3963ca875
/src/safety/formulas/disjunction.cpp
86e135a64dbf77579406d53a8d3cee0db9ca867e
[]
no_license
mattmaly/safety
d43e28c625704d6f9243cc90286bef892631b861
f3dc83275d23b919ad4a9dbdb905a3330fa8ceef
refs/heads/master
2021-07-05T16:10:45.211684
2021-06-04T21:51:51
2021-06-04T21:51:51
9,559,153
0
1
null
2013-09-13T21:09:36
2013-04-20T04:18:56
C++
UTF-8
C++
false
false
2,241
cpp
disjunction.cpp
#include <string> #include "safety/formulas/disjunction.h" #include "safety/world.h" #include "safety/formulas/false.h" Disjunction::Disjunction(const std::set<Formula*>& c) : CommutativeFormula(c) { } Disjunction::~Disjunction() { } Formula* Disjunction::copy() const { std::set<Formula*> copyChildren; for (Formula* c : children) copyChildren.insert(c->copy()); return new Disjunction(copyChildren); } Formula* Disjunction::simplify() const { std::set<Formula*> simpChildren; for (Formula* c : children) { Formula* sc = c->simplify(); if (sc->isTrue()) { for (Formula* cd : simpChildren) delete cd; return sc; } else if (sc->isFalse()) delete sc; else { //if disjunction, pull its children up, and then delete it Disjunction* disChild = dynamic_cast<Disjunction*>(sc); if (disChild == nullptr) { if (simpChildren.find(sc) == simpChildren.end()) simpChildren.insert(sc); //TODO memory leak if duplicate? else delete sc; } else { //TODO memory leak? for (Formula* dc : disChild->children) { if (simpChildren.find(dc) == simpChildren.end()) simpChildren.insert(dc); else delete dc; } disChild->children.clear(); delete disChild; //TODO does this prevent leak or is it overkill? } } } if (simpChildren.empty()) return new False(); if (simpChildren.size() == 1) return *simpChildren.begin(); return new Disjunction(simpChildren); } Formula* Disjunction::evaluate(const World& w) const { std::set<Formula*> evalChildren; for (Formula* c : children) { Formula* evalChild = c->evaluate(w); if (evalChildren.find(evalChild) == evalChildren.end()) evalChildren.insert(evalChild); else delete evalChild; } return new Disjunction(evalChildren); } std::string Disjunction::getType() const { return std::string("|"); }
b50e211d3b2bb7529e80a9e486023a44fe8d7861
f6eadc7c6bb7e516983722714980798a5054c22d
/rvm_SUBMIT.cpp
fabc978e8982ded9756f21755b8d50b6cf91b70d
[]
no_license
kartikaygarg/aos_rvm
f42a21d2d03a0a4b9e3d1b5d43d3e31221ef1567
0950d4f71d255dd7daedad39da9bbcc3bacc321e
refs/heads/master
2016-09-13T07:09:41.969108
2016-04-23T23:41:36
2016-04-23T23:41:36
56,731,541
0
0
null
null
null
null
UTF-8
C++
false
false
19,430
cpp
rvm_SUBMIT.cpp
#include "rvm.h" #include <sys/stat.h> #include <iostream> #include <stdlib.h> #include <fstream> #include <string.h> unsigned int tid_cnt = 0; using namespace std; //Creates A DIRECTORY with specified name where persistent memory space (extrenal data segment,log files) shall be maintained rvm_t rvm_init(const char *directory){ struct stat st; rvm_tt* rvm_dir = NULL; rvm_dir = (rvm_tt*)malloc(sizeof(rvm_tt)); new (rvm_dir) rvm_tt(); if(mkdir(directory, 0700) != 0){ //dir not created stat(directory,&st); //if((chmod(directory,(st.st_mode|700))== EPERM) || (chmod(directory,(st.st_mode|700))== EROFS)){ if(chmod(directory,(st.st_mode|0700))== -1){ printf("Cannot create directory here. Check user permissions or Read-Only flag on memory space."); rvm_dir->dirname = NULL; return rvm_dir; } } rvm_dir->dirname = (char*) malloc (strlen(directory)+2); strcpy(rvm_dir->dirname,directory); strcat(rvm_dir->dirname,"/"); rvm_dir->dirname[strlen(directory)+1] = '\0'; rvm_dir->redo_file = (char*)malloc( sizeof(char) * ( strlen("redo1.txt") +1) ); strcpy(rvm_dir->redo_file, "redo1.txt"); rvm_dir->redo_file[strlen("redo1.txt")] = '\0'; rvm_gb = rvm_dir; rvm_truncate_log(rvm_dir); return rvm_dir; } char* dir_prefix(rvm_t rvm, char* segname){ char* prefix = NULL; prefix = (char*)malloc(sizeof(char) * ( strlen(rvm->dirname)+ (strlen(segname) +1 ) ) ); strcpy(prefix, rvm->dirname); strcat(prefix,segname); prefix[strlen(rvm->dirname) + strlen(segname)] = '\0'; return prefix; } void rvm_truncate_log(rvm_t rvm){ FILE *redo_seg = NULL; FILE *temp = NULL; char * file_name = NULL; unsigned int i = 0; file_name = dir_prefix(rvm,rvm->redo_file); redo_seg = fopen(file_name,"rb"); if(redo_seg == NULL){ return; } redo_t redo1; mod_t mod1; while(fgetc(redo_seg)!= EOF){ fseek(redo_seg,-1,SEEK_CUR); ++(redo1.num_updates); fread((void*) (&(mod1.segname_size)) , sizeof(unsigned int), 1, redo_seg ); mod1.segname = (char*) malloc(sizeof(char) * mod1.segname_size); fread((void*) (mod1.segname) , sizeof(char), (mod1.segname_size), redo_seg ); mod1.segname[mod1.segname_size -1] = '\0'; fread((void*) (&(mod1.offset)) , sizeof(int), 1, redo_seg ); fread((void*) (&(mod1.size)) , sizeof(int), 1, redo_seg ); mod1.data_ptr = calloc((mod1.size+1),sizeof(char)); fread( (mod1.data_ptr) , sizeof(char), ((mod1.size)), redo_seg ); redo1.redo_log.push_back(mod1); //free(mod1.segname); //free(mod1.data_ptr); } fclose(redo_seg); char* file_name2 = NULL; for(i=0;i<redo1.num_updates;++i){ mod1 = redo1.redo_log.front(); file_name2 = dir_prefix(rvm,mod1.segname); temp = fopen(file_name2,"rt+"); fseek(temp,mod1.offset,SEEK_SET); fwrite(mod1.data_ptr,sizeof(char),mod1.size,temp); fclose(temp); free(mod1.segname); free(mod1.data_ptr); redo1.redo_log.pop_front(); free(file_name2); } //Delete redo1.txt file or clear out its contents //Easy way, just open the file in write mode, WILL OVERWRITE!!! and create a blank file remove(file_name); free(file_name); } char* lookup_name(rvm_t rvm, const char* segname){ std::map<char*,segment_t>::iterator seg_ptr; seg_ptr = rvm->seg_db.begin(); for(;seg_ptr != rvm->seg_db.end();++seg_ptr){ if( strcmp(seg_ptr->second.segname,segname) == 0 ){ return seg_ptr->second.segname; } } return NULL; } void *rvm_map(rvm_t rvm, const char *segname, int size_to_create){ if(segname == NULL){ return (void*) -1; } rvm_truncate_log(rvm); char* seg_name = NULL; seg_name = (char*)malloc((strlen(segname)+1)*sizeof(char)); strcpy(seg_name,segname); seg_name[strlen(segname)] = '\0'; FILE * fseg = NULL; char* seg_ptr = NULL; seg_ptr = lookup_name(rvm, segname); if(seg_ptr == NULL){ //not present in the map, install and opoen file (if exists), if not, then create an empty file segment_t* new_seg = NULL; new_seg = (segment_t*)malloc(sizeof(segment_t)); new (new_seg) segment_t(); new_seg->segname = (char*)malloc((strlen(segname)+1)*sizeof(char)); strcpy(new_seg->segname,segname); new_seg->segname[strlen(segname)] = '\0'; new_seg->segbase = calloc(size_to_create,sizeof(char)); fseg = fopen(dir_prefix(rvm,seg_name),"ab+"); if(fseg == NULL){ cout<<"ERROR. Segment file was NOT found in dir. File unable to open!!!\n"; fflush(stdout); return (void*) -1; } // fseek(fseg,0,SEEK_SET); fread(new_seg->segbase,sizeof(char),size_to_create,fseg); fclose(fseg); new_seg->size = size_to_create; if(new_seg->undo_log != NULL){ //means currently under some TRANSACTION, since undo log is not NULL || ILLEGAL operation cout<<"\nRECHECK: UNDO_log ptr, is NOT NULL but segbase ptr is NULL!!!"; //Means a transaction was not cleared properly, as UNDO LOG was not cleared & freed fflush(stdout); } else{ //cout<<"\nRECHECK: UNDO_log ptr, is NULL but segbase ptr is NOT!!!"; // new_seg->undo_log = calloc(size_to_create,sizeof(char)); // memcpy(new_seg->undo_log,new_seg->segbase,size_to_create); } rvm->seg_db.insert( std::pair<char*,segment_t>(new_seg->segname,*new_seg) ); return new_seg->segbase; } else{ //present in the map if( rvm->seg_db[seg_ptr].segbase == NULL ){ //currently not mapped to memory (thus surely NO TRANSACTION) rvm->seg_db[seg_ptr].segbase = malloc(size_to_create*sizeof(char)); fseg = fopen(dir_prefix(rvm,seg_ptr),"ab+"); if(fseg == NULL){ cout<<"ERROR. Segment file was NOT found in dir. File unable to open!!!\n"; fflush(stdout); return (void*) -1; } // fseek(fseg,0,SEEK_SET); fread(rvm->seg_db[seg_ptr].segbase,sizeof(char),size_to_create,fseg); fclose(fseg); rvm->seg_db[seg_ptr].size = size_to_create; if(rvm->seg_db[seg_ptr].tid != 0){ cout<<"\nRECHECK: TID is NOT 0 but segbase ptr is NULL!!!"; //Means a transaction was not cleared properly, as UNDO LOG was not cleared & freed } if(rvm->seg_db[seg_ptr].trans != NULL){ cout<<"\nRECHECK: TRANS is NOT NULL but segbase ptr is NULL!!!"; //Means a transaction was not cleared properly, as UNDO LOG was not cleared & freed } rvm->seg_db[seg_ptr].tid = 0; rvm->seg_db[seg_ptr].trans = NULL; if(rvm->seg_db[seg_ptr].undo_log != NULL){ //means currently under some TRANSACTION, since undo log is not NULL || ILLEGAL operation cout<<"\nRECHECK: UNDO_log ptr, is NOT NULL but segbase ptr is NULL!!!"; //Means a transaction was not cleared properly, as UNDO LOG was not cleared & freed free(rvm->seg_db[seg_ptr].undo_log); // rvm->seg_db[seg_ptr]->undo_log = calloc(size_to_create,sizeof(char)); // memcpy(rvm->seg_db[seg_ptr]->undo_log,rvm->seg_db[seg_ptr]->segbase,size_to_create); } else{ //cout<<"\nRECHECK: UNDO_log ptr, is NULL but segbase ptr is NOT!!!"; // rvm->seg_db[seg_ptr]->undo_log = calloc(size_to_create,sizeof(char)); // memcpy(rvm->seg_db[seg_ptr]->undo_log,rvm->seg_db[seg_ptr]->segbase,size_to_create); } //CAN't DO here: since create UNDO logs in begin_trans() and not here in map // rvm->seg_db[seg_ptr].undo_log = calloc(size_to_create,sizeof(char)); // memcpy(rvm->seg_db[seg_ptr].undo_log,rvm->seg_db[seg_ptr].segbase,size_to_create); return rvm->seg_db[seg_ptr].segbase; } else{ //presently mapped to memory, MAY/MAY NOT being operated on by some transactions // cout<<"Segment Mapping found in map, and SEGBASE was NOT NULL. Mapping already exists. NOthing to do!\n"; /* //void* temp_ptr = NULL; //Create a new copy of the UNDO log on the mapping function call if(rvm->seg_db[seg_ptr].undo_log != NULL){ //means currently under some TRANSACTION, since undo log is not NULL || ILLEGAL operation //free(rvm->seg_db[seg_ptr].undo_log); } else{ //cout<<"\nRECHECK: UNDO_log ptr, is NULL but segbase ptr is NOT!!!"; //Was Possible, since memory could be mapped but not under any TRANSACTION //rvm->seg_db[seg_ptr].undo_log = calloc(size_to_create,sizeof(char)); } //temp_ptr = calloc(size_to_create,sizeof(char)); if(rvm->seg_db[seg_ptr].size < size_to_create){ //memcpy(temp_ptr,rvm->seg_db[seg_ptr].segbase,rvm->seg_db[seg_ptr].size); //free(rvm->seg_db[seg_ptr].segbase); } else if(rvm->seg_db[seg_ptr].size > size_to_create){ //memcpy(temp_ptr,rvm->seg_db[seg_ptr].segbase,size_to_create); //free(rvm->seg_db[seg_ptr].segbase); } else{ //equal to already what exists //no steps to be taken, simply return } //memcpy(rvm->seg_db[seg_ptr].undo_log,rvm->seg_db[seg_ptr].segbase,size_to_create); //ASK: re-create the UNDO log entry for every case, (RECREATE UNDO LOG/refresh it for an existing mapping??) //rvm->seg_db[seg_ptr].segbase = temp_ptr; //rvm->seg_db[seg_ptr].size = size_to_create; */ return (void *) -1; //ASK: if return -1, for all cases, if mapping exists, whether it may be same/small/bigger size } } } char* base2name(rvm_t rvm,void* segbase){ std::map<char*,segment_t>::iterator seg_ptr; seg_ptr = rvm->seg_db.begin(); for(;seg_ptr != rvm->seg_db.end();++seg_ptr){ if(seg_ptr->second.segbase == segbase ){ return seg_ptr->second.segname; } } return NULL; } void rvm_unmap(rvm_t rvm, void *segbase){ if( (segbase == NULL) || (rvm == NULL) ){ return; } char* temp_segname = NULL; temp_segname = base2name(rvm,segbase); if(temp_segname == NULL){ //Segment is unmapped return; } else{ free(rvm->seg_db[temp_segname].segbase); rvm->seg_db[temp_segname].segbase = NULL; if(rvm->seg_db[temp_segname].undo_log != NULL){ free(rvm->seg_db[temp_segname].undo_log); rvm->seg_db[temp_segname].undo_log = NULL; } rvm->seg_db[temp_segname].size = 0; if(rvm->seg_db[temp_segname].trans != NULL){ //Clear transactions operating on this segment //FREE up and abort and remove existing transaction for(unsigned int i=0; i< rvm->seg_db[temp_segname].trans->num_seg;++i){ //Can't FREE segbase and segnames, since the pointers in transaction are simply pointers to those in the seg_db segment database. Thus freeing them will lead to unmapping of those segments. if(rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].segbase != segbase){ //delete properties of all other segments apart from the currently being unmapped segment rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].tid = 0; memcpy(rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].segbase,rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].undo_log,rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].size); free(rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].undo_log); rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].undo_log = NULL; rvm->seg_db[rvm->seg_db[temp_segname].trans->seg_names[i]].trans = NULL; } } rvm->trans.erase(rvm->seg_db[temp_segname].trans->tid); //POP from trans_db rvm->seg_db[temp_segname].trans->tid = 0; rvm->seg_db[temp_segname].trans->num_seg = 0; rvm->seg_db[temp_segname].tid = 0; free(rvm->seg_db[temp_segname].trans); rvm->seg_db[temp_segname].trans = NULL; } } rvm->seg_db.erase(temp_segname); //Pop from seg_db free(temp_segname); temp_segname = NULL; } trans_t rvm_begin_trans(rvm_t rvm, int numsegs, void **segbases){ if(segbases == NULL){ return (trans_t) -1; } trans_tt* new_trans = NULL; new_trans = (trans_tt*)calloc(1,sizeof(trans_tt)); new (new_trans) trans_tt(); int i=0; new_trans->tid = ++(tid_cnt); new_trans->num_seg = numsegs; new_trans->seg_names = (char**)malloc(numsegs*sizeof(char*)); new_trans->seg_bases = (void**)calloc(numsegs,sizeof(void*)); for(i=0;i<numsegs;++i){ if(segbases[i] == NULL){ cout<<"\n Pls CHECK the testcase. One of the passed base pointers to begin_trans() was NULL.\n"; return (trans_t) -1; } new_trans->seg_names[i] = base2name(rvm,segbases[i]); if(rvm->seg_db[new_trans->seg_names[i]].undo_log == NULL){ if(rvm->seg_db[new_trans->seg_names[i]].tid != 0){ cout<<"\nRECHECK: UNDO_log ptr, is NULL but segment.TID is NOT 0!!!\n"; //Means a transaction was not cleared properly, as UNDO LOG was not cleared & freed } if(rvm->seg_db[new_trans->seg_names[i]].trans != NULL){ cout<<"\nRECHECK: UNDO_log ptr, is NULL but TRANS ptr is NOT NULL!!!\n"; //Means a transaction was not cleared properly, as UNDO LOG was not cleared & freed } rvm->seg_db[new_trans->seg_names[i]].undo_log = calloc( rvm->seg_db[new_trans->seg_names[i]].size , sizeof(char) ); memcpy(rvm->seg_db[new_trans->seg_names[i]].undo_log,segbases[i],rvm->seg_db[new_trans->seg_names[i]].size); } else{ //ALREADY BEING OPERATED BY SOME OTHER TRANSACTION cout<<"Segment is already under operation by SOME OTHER TRANSaction.\n"; return (trans_t) -1; break; } rvm->seg_db[new_trans->seg_names[i]].tid = tid_cnt; rvm->seg_db[new_trans->seg_names[i]].trans = new_trans; new_trans->seg_bases[i] = segbases[i]; } rvm->trans.insert( std::pair<unsigned int,trans_tt*>(tid_cnt,new_trans) ); return new_trans->tid; } //MAKE SURE THAT IN ABORT AS WELL AS IN COMMIT, I AM CLEARING TID AND TRANS OF SEGMENTS, IT WAS OPERATING ON, AND ALSO CLEAR THE UNDO_LOG POINTER AND void rvm_abort_trans(trans_t tid){ //Just like receiving an object if(rvm_gb == NULL){ return; } trans_tt* temp = NULL; temp = rvm_gb->trans[tid]; if(temp != NULL){ //Clear transactions operating on this segment //FREE up and abort and remove existing transaction for(unsigned int i=0; i< temp->num_seg;++i){ //Can't FREE segbase and segnames, since the pointers in transaction are simply pointers to those in the seg_db segment database. Thus freeing them will lead to unmapping of those segments. //if(rvm_gb->seg_db[temp->seg_names[i]].segbase != segbase){ //delete properties of all other segments apart from the currently being unmapped segment rvm_gb->seg_db[temp->seg_names[i]].tid = 0; memcpy(rvm_gb->seg_db[temp->seg_names[i]].segbase,rvm_gb->seg_db[temp->seg_names[i]].undo_log,rvm_gb->seg_db[temp->seg_names[i]].size); free(rvm_gb->seg_db[temp->seg_names[i]].undo_log); rvm_gb->seg_db[temp->seg_names[i]].undo_log = NULL; rvm_gb->seg_db[temp->seg_names[i]].trans = NULL; //} } //TO-DO: See if have to free the mod_t elements (data_ptr) and pop_front() from the redo_log list. //Also see if want to change, the mod_t to mod_t* and then delete those pointers. (FREE them) // std::list<mod_t>::iterator ptr_redo; // for(ptr_redo = temp->redo_obj.redo_log.begin(); ptr_redo != temp->redo_obj.redo_log.end() ; ++ptr_redo){ // free(temp->redo_obj.redo_log.front()->data_ptr); // } temp->redo_obj.num_updates = 0; rvm_gb->trans.erase(temp->tid); //POP from trans_db temp->tid = 0; temp->num_seg = 0; free(temp); temp = NULL; } else{ cout<<"Invalid operation. The transaction doesn't exist anymore. Perhaps you unmapped a segment belonging to the transaction, which led to automatic deletion of the transaction.\n"; return; } } void rvm_about_to_modify(trans_t tid, void *segbase, int offset, int size){ if( (rvm_gb == NULL) || (segbase == NULL) || (tid == 0) ){ return; } trans_tt* temp = NULL; temp = rvm_gb->trans[tid]; if(temp != NULL){ mod_t* new_mod = NULL; new_mod = (mod_t*)calloc(1,sizeof(mod_t)); new (new_mod) mod_t(); new_mod->segname = base2name(rvm_gb,segbase); if(new_mod->segname == NULL){ cout<<"ERROR. Segment doesn't exist in the segment database!\n"; fflush(stdout); } new_mod->segname_size = strlen(new_mod->segname)+1; new_mod->offset = offset; new_mod->size = size; ++(temp->redo_obj.num_updates); temp->redo_obj.redo_log.push_back(*new_mod); //TO-DO: See if i can delete the pointer and free it right away!? free(new_mod); new_mod = NULL; } else{ cout<<"Invalid operation. The transaction doesn't exist anymore. Perhaps you unmapped a segment belonging to the transaction, which led to automatic deletion of the transaction.\n"; return; } } void rvm_commit_trans(trans_t tid){ if( (rvm_gb == NULL) || (tid == 0) ){ return; } trans_tt* temp = NULL; temp = rvm_gb->trans[tid]; if(temp != NULL){ FILE *redo_seg = NULL; //unsigned int i=0; char * file_name = NULL; file_name = dir_prefix(rvm_gb,rvm_gb->redo_file); redo_seg = fopen(file_name,"ab"); while(temp->redo_obj.num_updates){ --(temp->redo_obj.num_updates); fwrite((void*) (&(temp->redo_obj.redo_log.front().segname_size)) , sizeof(unsigned int), 1, redo_seg ); fwrite((void*) (temp->redo_obj.redo_log.front().segname) , sizeof(char), (temp->redo_obj.redo_log.front().segname_size), redo_seg ); fwrite((void*) (&(temp->redo_obj.redo_log.front().offset)) , sizeof(int), 1, redo_seg ); fwrite((void*) (&(temp->redo_obj.redo_log.front().size)) , sizeof(int), 1, redo_seg ); // char* temp_data = (char*)(rvm_gb->seg_db[temp->redo_obj.redo_log.front().segname].segbase); // for(int i=0; i < (temp->redo_obj.redo_log.front().offset) ;++i,++temp_data){ // } // fwrite( (void*)temp_data , sizeof(char), (temp->redo_obj.redo_log.front().size), redo_seg ); // fwrite( &(rvm_gb->seg_db[temp->redo_obj.redo_log.front().segname].segbase[temp->redo_obj.redo_log.front().offset] ) , sizeof(char), (temp->redo_obj.redo_log.front().size), redo_seg ); fwrite( ( (rvm_gb->seg_db[temp->redo_obj.redo_log.front().segname].segbase) + temp->redo_obj.redo_log.front().offset ) , sizeof(char), temp->redo_obj.redo_log.front().size, redo_seg ); temp->redo_obj.redo_log.pop_front(); } fclose(redo_seg); free(file_name); file_name = NULL; for(unsigned int i=0; i< temp->num_seg;++i){ //Can't FREE segbase and segnames, since the pointers in transaction are simply pointers to those in the seg_db segment database. Thus freeing them will lead to unmapping of those segments. //Not applicable for this case, as want to clear out all transactional properties //if(rvm_gb->seg_db[temp->seg_names[i]].segbase != segbase){ //delete properties of all other segments apart from the currently being unmapped segment rvm_gb->seg_db[temp->seg_names[i]].tid = 0; free(rvm_gb->seg_db[temp->seg_names[i]].undo_log); rvm_gb->seg_db[temp->seg_names[i]].undo_log = NULL; rvm_gb->seg_db[temp->seg_names[i]].trans = NULL; //} } //TO-DO: See if have to free the mod_t elements (data_ptr) and pop_front() from the redo_log list. //Also see if want to change, the mod_t to mod_t* and then delete those pointers. (FREE them) temp->redo_obj.num_updates = 0; rvm_gb->trans.erase(temp->tid); //Pop from the transaction database temp->tid = 0; temp->num_seg = 0; free(temp); temp = NULL; } else{ cout<<"Invalid operation. The transaction doesn't exist anymore. Perhaps you unmapped a segment belonging to the transaction, which led to automatic deletion of the transaction.\n"; return; } } void rvm_destroy(rvm_t rvm, const char *segname){ if(segname == NULL){ return; } rvm_truncate_log(rvm); char* index_name = NULL; char* file_name = NULL; file_name = dir_prefix(rvm,(char*)segname); remove(file_name); free(file_name); file_name = NULL; index_name = lookup_name(rvm, segname); if(index_name != NULL){ rvm_unmap(rvm,rvm->seg_db[index_name].segbase); index_name = NULL; } }
c42bbcae519de50cacb443bb804fd9c0739e1aa3
5cfdf1b07117eaf3f5b784c55f3f438e1d91efbd
/src/Logger/LoggerImpl.cpp
a4c0a6d22a00dbcafed476b70bdccca0f05579d4
[]
no_license
iloveooz/tiho_the_game
c950d3e4c62c1d7339ad1510532095952a64dd75
3b61cae6d920f19d30c6c2426412a37189006c63
refs/heads/master
2023-02-04T00:41:14.617230
2023-01-26T17:09:35
2023-01-26T17:09:35
134,223,561
0
0
null
null
null
null
UTF-8
C++
false
false
1,601
cpp
LoggerImpl.cpp
#include "LoggerImpl.hpp" LoggerImpl::LoggerImpl() { try { out.open("output.txt", std::ofstream::out); } catch (...) {} if(!out) { throw std::runtime_error("Could not open file : for writing"); } } LoggerImpl::~LoggerImpl() noexcept { try { if (out.is_open()) out.close(); } catch (...) {} } void LoggerImpl::console_log(const std::string& place, const std::string &event) { // Дата: Время: Класс: Метод: Событие std::string time(21, ' '); getTime(time); std::cout << time << place << ", event: " << event << std::endl; } void LoggerImpl::file_log(const std::string& place, const std::string &fileName, const std::string &event) { if (!out) { std::cerr << "\nError opening file!" << std::endl; } // Дата: Время: Класс: Метод: Событие std::string time(21, ' '); getTime(time); out << time << ", " << place.c_str() << ", event: " << event.c_str() << std::endl; } void LoggerImpl::socket_log(const std::string& place, const std::string &host, long port, const std::string &event) { // Дата: Время: Класс: Метод: Событие std::string time; getTime(time); std::cout << time << ", " << place << ", event: " << event << std::endl; } void LoggerImpl::getTime(std::string &time) { std::time_t timeNow = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); // get time now std::strftime(&time[0], time.size(), "%d-%m-%Y, %H:%M:%S:", std::localtime(&timeNow)); }
00de658bc0153492dd95a77ed2beaeebce602f0a
7d1909e5b49ff1ecdc0fd5f93365100cbc5a2b48
/CTime/CTime.h
41dd80777ee925720b0c18866c35d069c6e3905f
[]
no_license
luannn308/exercises_mini
a77ac7dac7e20ca64897c1a5b8ac886af9b4bb54
f5f24092f1e4f386c3dd8607ccd2e1d76d3e1c9c
refs/heads/master
2023-08-06T23:19:43.068993
2021-09-20T14:06:46
2021-09-20T14:06:46
408,465,432
0
0
null
null
null
null
UTF-8
C++
false
false
1,096
h
CTime.h
#pragma once #include<iostream> #include "CTimeSpan.h" using namespace std; class CTime { private: int gio; int phut; int giay; public: CTime(); CTime(int, int, int); ~CTime(); CTime operator+(const int sec); CTime operator-(const int sec); CTime operator++(); CTime operator--(); friend CTimeSpan operator -(CTime a , CTime b); friend istream& operator >>(istream& is, CTime& a) { do { cout << "Nhap hour: "; is >> a.gio; } while (a.gio < 0 || a.gio>23); do { cout << "Nhap minute: "; is >> a.phut; } while (a.phut < 0 || a.phut>59); do { cout << "Nhap second: "; is >> a.giay; } while (a.giay < 0 || a.giay>59); return is; } friend ostream& operator <<(ostream& os, CTime& a) { if (a.gio > 12) { os << a.gio - 12 << ":"; } else { os << a.gio << ":"; } if (a.phut < 10) { os << "0" << a.phut << ":"; } else { os << a.phut << ":"; } if (a.giay < 10) { os << "0" << a.giay; } else { os << a.giay; } if (a.gio > 12) { os << " PM"; } else { os << " AM"; } return os; } };
c8942cd1c34d9011c3fd11de5783e5fc42c0b35d
fc0664a076eeb69a3a8a89e7af25329c3998dd07
/Core/STL/Defines/OperatorHelpers.h
21c7a6b28bea4cdfed40802e68abeda528b25362
[ "BSD-2-Clause" ]
permissive
azhirnov/ModularGraphicsFramework
fabece2887da16c8438748c9dd5f3091a180058d
348be601f1991f102defa0c99250529f5e44c4d3
refs/heads/master
2021-07-14T06:31:31.127788
2018-11-19T14:28:16
2018-11-19T14:28:16
88,896,906
14
0
null
null
null
null
UTF-8
C++
false
false
11,130
h
OperatorHelpers.h
// Copyright (c) Zhirnov Andrey. For more information see 'LICENSE.txt' /* Helpers for dimensions types. */ #pragma once #include "Core/STL/Common/Types.h" // TODO: rename #define _GX_DIM_OPERATORS_SELF( _op_, _value_ ) \ \ forceinline Self& operator _op_##= (const Self &right) noexcept { _value_ _op_##= right._value_; return *this; } \ ND_ forceinline constexpr Self operator _op_ (const Self &right) const noexcept { return Self( _value_ _op_ right._value_ ); } #define _GX_DIM_OPERATORS_TYPE( _op_, _value_, _type_, _memberOption_ ) \ \ forceinline Self& operator _op_##= (_type_ right) noexcept { _value_ _op_##= static_cast<const Value_t>( right _memberOption_ ); return *this; } \ ND_ forceinline constexpr Self operator _op_ (_type_ right) const noexcept { return Self( _value_ _op_ static_cast<const Value_t>( right _memberOption_ ) ); } \ \ ND_ friend forceinline constexpr Self operator _op_ (_type_ left, const Self &right) noexcept { return Self( static_cast<const Value_t>( left _memberOption_ ) _op_ right._value_ ); } #define _GX_DIM_OPERATORS_TEMPLATE( _op_, _value_, _memberOption_ ) \ \ template <typename _A_> forceinline Self& operator _op_##= (const _A_ &right) noexcept { _value_ _op_##= static_cast<const Value_t>( right _memberOption_ ); return *this; } \ template <typename _A_> ND_ forceinline constexpr Self operator _op_ (const _A_ &right) const noexcept { return Self( _value_ _op_ static_cast<const Value_t>( right _memberOption_ ) ); } \ \ template <typename _A_> \ ND_ friend forceinline constexpr Self operator _op_ (const _A_ &left, const Self &right) noexcept { return Self( static_cast<const Value_t>( left _memberOption_ ) _op_ right._value_ ); } #define _GX_DIM_CMP_OPERATORS_SELF( _value_ ) \ \ ND_ forceinline constexpr bool operator == (const Self &right) const noexcept { return this->_value_ == right._value_; } \ ND_ forceinline constexpr bool operator != (const Self &right) const noexcept { return this->_value_ != right._value_; } \ ND_ forceinline constexpr bool operator > (const Self &right) const noexcept { return this->_value_ > right._value_; } \ ND_ forceinline constexpr bool operator < (const Self &right) const noexcept { return this->_value_ < right._value_; } \ ND_ forceinline constexpr bool operator >= (const Self &right) const noexcept { return this->_value_ >= right._value_; } \ ND_ forceinline constexpr bool operator <= (const Self &right) const noexcept { return this->_value_ <= right._value_; } #define _GX_DIM_CMP_OPERATORS_TYPE( _value_, _type_, _memberOption_ ) \ \ ND_ forceinline constexpr bool operator == (_type_ right) const noexcept { return this->_value_ == static_cast<const Value_t>( right _memberOption_ ); } \ ND_ forceinline constexpr bool operator != (_type_ right) const noexcept { return this->_value_ != static_cast<const Value_t>( right _memberOption_ ); } \ ND_ forceinline constexpr bool operator > (_type_ right) const noexcept { return this->_value_ > static_cast<const Value_t>( right _memberOption_ ); } \ ND_ forceinline constexpr bool operator < (_type_ right) const noexcept { return this->_value_ < static_cast<const Value_t>( right _memberOption_ ); } \ ND_ forceinline constexpr bool operator >= (_type_ right) const noexcept { return this->_value_ >= static_cast<const Value_t>( right _memberOption_ ); } \ ND_ forceinline constexpr bool operator <= (_type_ right) const noexcept { return this->_value_ <= static_cast<const Value_t>( right _memberOption_ ); } \ \ ND_ friend forceinline constexpr bool operator == (_type_ left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) == right._value_; } \ ND_ friend forceinline constexpr bool operator != (_type_ left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) != right._value_; } \ ND_ friend forceinline constexpr bool operator > (_type_ left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) > right._value_; } \ ND_ friend forceinline constexpr bool operator < (_type_ left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) < right._value_; } \ ND_ friend forceinline constexpr bool operator >= (_type_ left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) >= right._value_; } \ ND_ friend forceinline constexpr bool operator <= (_type_ left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) <= right._value_; } #define _GX_DIM_CMP_OPERATORS_TEMPLATE( _value_, _memberOption_ ) \ \ template <typename _A_> ND_ forceinline constexpr bool operator == (const _A_ &right) const noexcept { return this->_value_ == static_cast<const Value_t>( right _memberOption_ ); } \ template <typename _A_> ND_ forceinline constexpr bool operator != (const _A_ &right) const noexcept { return this->_value_ != static_cast<const Value_t>( right _memberOption_ ); } \ template <typename _A_> ND_ forceinline constexpr bool operator > (const _A_ &right) const noexcept { return this->_value_ > static_cast<const Value_t>( right _memberOption_ ); } \ template <typename _A_> ND_ forceinline constexpr bool operator < (const _A_ &right) const noexcept { return this->_value_ < static_cast<const Value_t>( right _memberOption_ ); } \ template <typename _A_> ND_ forceinline constexpr bool operator >= (const _A_ &right) const noexcept { return this->_value_ >= static_cast<const Value_t>( right _memberOption_ ); } \ template <typename _A_> ND_ forceinline constexpr bool operator <= (const _A_ &right) const noexcept { return this->_value_ <= static_cast<const Value_t>( right _memberOption_ ); } \ \ template <typename _A_> ND_ friend forceinline constexpr bool operator == (const _A_ &left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) == right._value_; } \ template <typename _A_> ND_ friend forceinline constexpr bool operator != (const _A_ &left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) != right._value_; } \ template <typename _A_> ND_ friend forceinline constexpr bool operator > (const _A_ &left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) > right._value_; } \ template <typename _A_> ND_ friend forceinline constexpr bool operator < (const _A_ &left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) < right._value_; } \ template <typename _A_> ND_ friend forceinline constexpr bool operator >= (const _A_ &left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) >= right._value_; } \ template <typename _A_> ND_ friend forceinline constexpr bool operator <= (const _A_ &left, const Self &right) noexcept { return static_cast<const Value_t>( left _memberOption_ ) <= right._value_; } #define _GX_DIM_ALL_INTEGER_OPERATORS_SELF( _value_ ) \ _GX_DIM_OPERATORS_SELF( +, _value_ ) \ _GX_DIM_OPERATORS_SELF( -, _value_ ) \ _GX_DIM_OPERATORS_SELF( *, _value_ ) \ _GX_DIM_OPERATORS_SELF( /, _value_ ) \ _GX_DIM_OPERATORS_SELF( %, _value_ ) \ _GX_DIM_OPERATORS_SELF( >>, _value_ ) \ _GX_DIM_OPERATORS_SELF( <<, _value_ ) \ _GX_DIM_OPERATORS_SELF( |, _value_ ) \ _GX_DIM_OPERATORS_SELF( &, _value_ ) \ _GX_DIM_OPERATORS_SELF( ^, _value_ ) \ _GX_DIM_CMP_OPERATORS_SELF( _value_ ) \ ND_ forceinline constexpr Self operator ! () const noexcept { return Self( not _value_ ); } \ ND_ forceinline constexpr Self operator ~ () const noexcept { return Self( ~_value_ ); } \ forceinline Self & operator ++ () noexcept { ++_value_; return *this; } \ forceinline Self & operator -- () noexcept { --_value_; return *this; } \ forceinline const Self operator ++ (int) noexcept { Self ret(*this); ++(*this); return ret; } \ forceinline const Self operator -- (int) noexcept { Self ret(*this); --(*this); return ret; } #define _GX_DIM_ALL_INTEGER_OPERATORS_TYPE( _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( +, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( -, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( *, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( /, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( %, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( >>, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( <<, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( |, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( &, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( ^, _value_, _type_, _memberOption_ ) \ _GX_DIM_CMP_OPERATORS_TYPE( _value_, _type_, _memberOption_ ) #define _GX_DIM_ALL_INTEGER_OPERATORS_TEMPLATE( _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( +, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( -, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( *, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( /, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( %, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( >>, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( <<, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( |, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( &, _value_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( ^, _value_, _memberOption_ ) \ _GX_DIM_CMP_OPERATORS_TEMPLATE( _value_, _memberOption_ ) #define _GX_DIM_ALL_FLOAT_OPERATORS_SELF( _value_ ) \ _GX_DIM_OPERATORS_SELF( +, _value_ ) \ _GX_DIM_OPERATORS_SELF( -, _value_ ) \ _GX_DIM_OPERATORS_SELF( *, _value_ ) \ _GX_DIM_OPERATORS_SELF( /, _value_ ) \ _GX_DIM_CMP_OPERATORS_SELF( _value_ ) \ forceinline constexpr Self operator - () const noexcept { return Self( -_value_ ); } \ forceinline Self & operator ++ () noexcept { ++_value_; return *this; } \ forceinline Self & operator -- () noexcept { --_value_; return *this; } \ forceinline const Self operator ++ (int) noexcept { Self ret(*this); ++(*this); return ret; } \ forceinline const Self operator -- (int) noexcept { Self ret(*this); --(*this); return ret; } #define _GX_DIM_ALL_FLOAT_OPERATORS_TYPE( _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( +, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( -, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( *, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TYPE( /, _value_, _type_, _memberOption_ ) \ _GX_DIM_CMP_OPERATORS_TYPE( _value_, _type_, _memberOption_ ) #define _GX_DIM_ALL_FLOAT_OPERATORS_TEMPLATE( _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( +, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( -, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( *, _value_, _type_, _memberOption_ ) \ _GX_DIM_OPERATORS_TEMPLATE( /, _value_, _type_, _memberOption_ ) \ _GX_DIM_CMP_OPERATORS_TEMPLATE( _value_, _type_, _memberOption_ )
8a981875bb9ebb26bc81acbd7300b3bf2389c987
73c71311c08cb8d58b75dcd06c7a31f8b097b956
/impl/tizen_webview/public/tw_webview_delegate.cc
adfb566fd42c528b0f39024739b55d6fd36d8051
[ "BSD-3-Clause" ]
permissive
crosswalk-project/chromium-efl
47927f6e17c0553d3756d9b9ca5c3e783b3641b8
3c1af10d16e2df57e8584378b79f0ff3335eb99d
refs/heads/efl/crosswalk-10/39.0.2171.19
2023-03-23T12:34:43.754226
2014-12-15T23:47:39
2014-12-15T23:47:39
27,436,290
9
14
null
2015-01-21T08:10:49
2014-12-02T14:33:10
C++
UTF-8
C++
false
false
832
cc
tw_webview_delegate.cc
// Copyright (c) 2014 The Chromium Authors. All rights reserved. // Copyright 2014 Samsung Electronics. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "tw_webview_delegate.h" #include <base/logging.h> namespace tizen_webview { static WebViewDelegate* gWebViewDelegate = NULL; void WebViewDelegate::RegisterDelegate(WebViewDelegate* wv_delegate) { if (!gWebViewDelegate) { gWebViewDelegate = wv_delegate; } } bool WebViewDelegate::IsDelegateRegistered() { return gWebViewDelegate != NULL; } WebViewDelegate* WebViewDelegate::GetInstance() { if (!IsDelegateRegistered()) { DLOG(ERROR) << "tizen_webview::WebViewDelegate is not yet registered."; return NULL; } return gWebViewDelegate; } } // namespace tizen_webview
484f081cad5ac5c4d1e87db356d278de33e71087
9386df17a8a66fb84db98e3b606195609cf90e39
/Graph/Misc/arti.cpp
d9d506b9571edbd957c21e30537b99d502cfebee
[]
no_license
amanjainn/Important-algos
2d82187f47ba392a8d6448713c160e3b63b98e38
2fd8cc2097d4bd2cd3754dd974a23a62a6cd45cf
refs/heads/master
2023-06-25T10:34:24.495449
2021-07-13T08:29:11
2021-07-13T08:29:11
263,378,785
7
1
null
null
null
null
UTF-8
C++
false
false
1,047
cpp
arti.cpp
#include <bits/stdc++.h> using namespace std; set<int> points; void dfs(int src, vector<int> &dis, vector<int> &low, int timer, vector<int> adj[], int parent) { low[src] = dis[src] = timer++; int children = 0; for (int child : adj[src]) { if (child == parent) continue; if (low[child] == -1) { children++; dfs(child, dis, low, timer, adj, src); low[src] = min(low[src], low[child]); if (low[child] >= dis[src] && parent != -1) { points.insert(src); } } else { low[src] = min(low[src], dis[child]); } } if (children > 1 && parent == -1) { points.insert(src); } } int main() { int n, m; cin >> n >> m; vector<int> adj[n]; for (int i = 0; i < m; i++) { int x, y; cin >> x >> y; adj[x].push_back(y); adj[y].push_back(x); } vector<int> dis(n, -1), low(n, -1); int timer = 0; for (int i = 0; i < n; i++) { if (low[i] == -1) { dfs(i, dis, low, timer, adj, -1); } } for (int x : points) { cout << x << " "; } }
9c9470e3b52707ab18b4f830eb72edcfb8d89109
bbfd855e95fc706c29285a5238bb71a1bcd45746
/QuaTextEdit.cpp
1c79c84bffec14c194bdfa738f817978e0f06055
[]
no_license
QuaIBF/QuaNotebook
52673817d5b4b635619d82800036b5d0f7fc1cba
4ee7de870b78830d3750f52a46fe1b7193eec76d
refs/heads/master
2016-09-15T06:22:26.221001
2015-10-06T15:05:12
2015-10-06T15:05:12
43,620,336
0
0
null
null
null
null
UTF-8
C++
false
false
31,732
cpp
QuaTextEdit.cpp
#include "QuaTextEdit.h" QuaTextEdit::QuaTextEdit(QWidget *aParent) : QTextEdit(aParent) { // // Set Up Layout // this->setFont(QFont("Arial Unicode MS", 12)); this->setTabStopWidth(this->document()->indentWidth()); this->setAlignment(Qt::AlignJustify); this->setAutoFormatting(QTextEdit::AutoAll); // // Set Up Context Menu // this->QuaSetUpContextMenu(); // // Set Up Hash Replacement // this->QuaSetUpHashReplacement(); // // Connect signals and slots // //QObject::connect(this, SIGNAL(textChanged()), this, SLOT(on_mNotesTextEdit_textChanged())); } QuaTextEdit::~QuaTextEdit() { } bool QuaTextEdit::IBFSaveToFile(QString aString) { this->setDocumentTitle("This is the title!!!"); QTextDocumentWriter tTextDocumentWriter; tTextDocumentWriter.setFileName(aString); if ( !tTextDocumentWriter.write(this->document()) ) { return false; } this->document()->setModified(false); } bool QuaTextEdit::IBFLoadFromFile(QString aString) { return false; } void QuaTextEdit::contextMenuEvent(QContextMenuEvent *event) { mContextMenu->exec(event->globalPos()); } void QuaTextEdit::focusInEvent(QFocusEvent *e) { this->IBFSaveToFile(this->windowFilePath()); QTextEdit::focusInEvent(e); } void QuaTextEdit::focusOutEvent(QFocusEvent *e) { this->IBFSaveToFile(this->windowFilePath()); QTextEdit::focusOutEvent(e); } void QuaTextEdit::dragEnterEvent(QDragEnterEvent * event) { if ( event->mimeData()->hasUrls() ) { foreach ( QUrl tUrl, event->mimeData()->urls() ) { QString tFileName = tUrl.toLocalFile(); QString tFileExtension = QFileInfo(tFileName).suffix().toLower(); if ( tFileExtension == "bmp" ) { event->acceptProposedAction(); return; } if ( tFileExtension == "jpg" ) { event->acceptProposedAction(); return; } if ( tFileExtension == "jpeg" ) { event->acceptProposedAction(); return; } if ( tFileExtension == "png" ) { event->acceptProposedAction(); return; } if ( tFileExtension == "ppm" ) { event->acceptProposedAction(); return; } if ( tFileExtension == "xbm" ) { event->acceptProposedAction(); return; } if ( tFileExtension == "xpn" ) { event->acceptProposedAction(); return; } } } } void QuaTextEdit::dropEvent(QDropEvent * event) { if ( event->mimeData()->hasUrls() ) { foreach ( QUrl tUrl, event->mimeData()->urls() ) { QString tFileName = tUrl.toLocalFile(); QString tFileExtension = QFileInfo(tFileName).suffix().toLower(); QImage tImage(tFileName); if ( !tImage.isNull() ) { QByteArray tByteArray; QBuffer tBuffer(&tByteArray); tImage.save(&tBuffer, "PNG"); QString tBase64 = QString::fromLatin1(tByteArray.toBase64().data()); QTextCursor tTextCursor = this->cursorForPosition(event->pos()); tTextCursor.insertHtml("<img src=\"data:image/png;base64," + tBase64 + "/>"); // // Dummy Event to prevent cursor malfunction. QMimeData * tMimeData = new QMimeData();// = QMimeData(); tMimeData->setText(""); QDropEvent * dummyEvent = new QDropEvent(event->posF(), event->possibleActions(), tMimeData, event->mouseButtons(), event->keyboardModifiers()); QTextEdit::dropEvent(dummyEvent); return; } } } } void QuaTextEdit::keyPressEvent(QKeyEvent * e) { if (e->key() == Qt::Key_Space ) { QTextCursor tCurrentWord = this->textCursor(); tCurrentWord.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor, 2); if ( mHashReplacement.contains(tCurrentWord.selectedText()) ) { tCurrentWord.insertText(mHashReplacement[tCurrentWord.selectedText()]); } } QTextEdit::keyPressEvent(e); } void QuaTextEdit::resizeEvent(QResizeEvent *e) { QMargins tMargins; if ( this->rect().width() > 700 ) { tMargins.setLeft((rect().width() - 700) / 2); tMargins.setRight((rect().width() - 700) / 2); } else { tMargins.setLeft(0); tMargins.setRight(0); } this->setViewportMargins(tMargins); return QTextEdit::resizeEvent(e); } bool QuaTextEdit::QuaSetUpContextMenu() { mContextMenu = new QMenu(); QMenu * tFileMenu = new QMenu("File"); QMenu * tEditMenu = new QMenu("Edit"); QMenu * tViewMenu = new QMenu("View"); QMenu * tInsertMenu = new QMenu("Insert"); QMenu * tFormatMenu = new QMenu("Format"); QMenu * tHelpMenu = new QMenu("Help"); this->mContextMenu->addMenu(tFileMenu); this->mContextMenu->addMenu(tEditMenu); this->mContextMenu->addMenu(tViewMenu); this->mContextMenu->addMenu(tInsertMenu); this->mContextMenu->addMenu(tFormatMenu); this->mContextMenu->addMenu(tHelpMenu); // // Menu File: QAction * actionNew = new QAction(tr("&New"), this); connect(actionNew, SIGNAL(triggered()), this, SLOT(on_actionNew_triggered())); tFileMenu->addAction(actionNew); addAction(actionNew); QAction * actionOpen = new QAction(tr("&Open..."), this); connect(actionOpen, SIGNAL(triggered()), this, SLOT(on_actionOpen_triggered())); tFileMenu->addAction(actionOpen); addAction(actionOpen); tFileMenu->addSeparator(); QAction * actionSave = new QAction(tr("&Save"), this); connect(actionSave, SIGNAL(triggered()), this, SLOT(on_actionSave_triggered())); tFileMenu->addAction(actionSave); addAction(actionSave); QAction * actionSaveAs = new QAction(tr("Save &As..."), this); connect(actionSaveAs, SIGNAL(triggered()), this, SLOT(on_actionSaveAs_triggered())); tFileMenu->addAction(actionSaveAs); addAction(actionSaveAs); tFileMenu->addSeparator(); QAction * actionQuit = new QAction(tr("&Quit"), this); connect(actionQuit, SIGNAL(triggered()), this, SLOT(on_actionQuit_triggered())); tFileMenu->addAction(actionQuit); addAction(actionQuit); // // Menu Edit: QAction * actionUndo = new QAction(tr("&Undo"), this); actionUndo->setShortcut(QKeySequence::Undo); actionUndo->setEnabled(this->document()->isUndoAvailable()); connect(this->document(), SIGNAL(undoAvailable(bool)), actionUndo, SLOT(setEnabled(bool))); connect(actionUndo, SIGNAL(triggered()), this, SLOT(undo())); tEditMenu->addAction(actionUndo); addAction(actionUndo); QAction *actionRedo = new QAction(tr("Redo"), this); actionRedo->setShortcut(QKeySequence::Redo); actionRedo->setEnabled(this->document()->isRedoAvailable()); connect(this->document(), SIGNAL(redoAvailable(bool)), actionRedo, SLOT(setEnabled(bool))); connect(actionRedo, SIGNAL(triggered()), this, SLOT(redo())); tEditMenu->addAction(actionRedo); addAction(actionRedo); tEditMenu->addSeparator(); QAction * actionCut = new QAction(tr("Cu&t"), this); actionCut->setShortcut(QKeySequence::Cut); actionCut->setEnabled(false); connect(actionCut, SIGNAL(triggered()), this, SLOT(cut())); connect(this, SIGNAL(copyAvailable(bool)), actionCut, SLOT(setEnabled(bool))); tEditMenu->addAction(actionCut); addAction(actionCut); QAction * actionCopy = new QAction(tr("&Copy"), this); actionCopy->setShortcut(QKeySequence::Copy); actionCopy->setEnabled(false); connect(actionCopy, SIGNAL(triggered()), this, SLOT(copy())); connect(this, SIGNAL(copyAvailable(bool)), actionCopy, SLOT(setEnabled(bool))); tEditMenu->addAction(actionCopy); addAction(actionCopy); QAction * actionPaste = new QAction(tr("&Paste"), this); actionPaste->setShortcut(QKeySequence::Paste); connect(actionPaste, SIGNAL(triggered()), this, SLOT(paste())); tEditMenu->addAction(actionPaste); addAction(actionPaste); QAction * actionPastePlainText = new QAction(tr("Paste Plain Text"), this); actionPastePlainText->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_V); connect(actionPastePlainText, SIGNAL(triggered()), this, SLOT(on_actionPastePlainText_triggered())); tEditMenu->addAction(actionPastePlainText); addAction(actionPastePlainText); // // Menu Insert: QAction * actionInsertHorizontalLine = new QAction(tr("Insert Horizontal Line"), this); //actionPastePlainText->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_V); connect(actionInsertHorizontalLine, SIGNAL(triggered()), this, SLOT(on_actionInsertHorizontalLine_triggered())); tInsertMenu->addAction(actionInsertHorizontalLine); addAction(actionInsertHorizontalLine); // // Menu Format: QAction * actionTextBold = new QAction(tr("&Bold"), this); actionTextBold->setShortcut(QKeySequence::Bold); connect(actionTextBold, SIGNAL(triggered()), this, SLOT(on_actionTextBold_triggered())); tFormatMenu->addAction(actionTextBold); addAction(actionTextBold); QAction * actionTextItalic = new QAction(tr("&Italic"), this); actionTextItalic->setShortcut(QKeySequence::Italic); connect(actionTextItalic, SIGNAL(triggered()), this, SLOT(on_actionTextItalic_triggered())); tFormatMenu->addAction(actionTextItalic); addAction(actionTextItalic); QAction * actionTextUnderline = new QAction(tr("&Underline"), this); actionTextUnderline->setShortcut(QKeySequence::Underline); connect(actionTextUnderline, SIGNAL(triggered()), this, SLOT(on_actionTextUnderline_triggered())); tFormatMenu->addAction(actionTextUnderline); addAction(actionTextUnderline); QAction * actionTextStrikeOut = new QAction(tr("&Strike Out"), this); actionTextStrikeOut->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_U); connect(actionTextStrikeOut, SIGNAL(triggered()), this, SLOT(on_actionTextStrikeOut_triggered())); tFormatMenu->addAction(actionTextStrikeOut); addAction(actionTextStrikeOut); tFormatMenu->addSeparator(); QAction * actionTextLeft = new QAction(tr("&Left"), this); actionTextLeft->setShortcut(Qt::CTRL + Qt::Key_L); connect(actionTextLeft, SIGNAL(triggered()), this, SLOT(on_actionTextLeft_triggered())); tFormatMenu->addAction(actionTextLeft); addAction(actionTextLeft); QAction * actionTextCenter = new QAction(tr("C&enter"), this); actionTextCenter->setShortcut(Qt::CTRL + Qt::Key_E); connect(actionTextCenter, SIGNAL(triggered()), this, SLOT(on_actionTextCenter_triggered())); tFormatMenu->addAction(actionTextCenter); addAction(actionTextCenter); QAction * actionTextRight = new QAction(tr("&Right"), this); actionTextRight->setShortcut(Qt::CTRL + Qt::Key_R); connect(actionTextRight, SIGNAL(triggered()), this, SLOT(on_actionTextRight_triggered())); tFormatMenu->addAction(actionTextRight); addAction(actionTextRight); QAction * actionTextJustify = new QAction(tr("&Justify"), this); actionTextJustify->setShortcut(Qt::CTRL + Qt::Key_J); connect(actionTextJustify, SIGNAL(triggered()), this, SLOT(on_actionTextJustify_triggered())); tFormatMenu->addAction(actionTextJustify); addAction(actionTextJustify); tFormatMenu->addSeparator(); QAction * actionTextSuperScript = new QAction(tr("SuperScript"), this); actionTextSuperScript->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_P); connect(actionTextSuperScript, SIGNAL(triggered()), this, SLOT(on_actionTextSuperScript_triggered())); tFormatMenu->addAction(actionTextSuperScript); addAction(actionTextSuperScript); QAction * actionTextSubScript = new QAction(tr("SubScript"), this); actionTextSubScript->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B); connect(actionTextSubScript, SIGNAL(triggered()), this, SLOT(on_actionTextSubScript_triggered())); tFormatMenu->addAction(actionTextSubScript); addAction(actionTextSubScript); tFormatMenu->addSeparator(); QAction * actionHeading1 = new QAction(tr("&Heading 1"), this); actionHeading1->setShortcut(Qt::CTRL + Qt::Key_1); connect(actionHeading1, SIGNAL(triggered()), this, SLOT(on_actionHeading1_triggered())); tFormatMenu->addAction(actionHeading1); addAction(actionHeading1); QAction * actionHeading2 = new QAction(tr("Heading 2"), this); actionHeading2->setShortcut(Qt::CTRL + Qt::Key_2); connect(actionHeading2, SIGNAL(triggered()), this, SLOT(on_actionHeading2_triggered())); tFormatMenu->addAction(actionHeading2); addAction(actionHeading2); QAction * actionHeading3 = new QAction(tr("Heading 3"), this); actionHeading3->setShortcut(Qt::CTRL + Qt::Key_3); connect(actionHeading3, SIGNAL(triggered()), this, SLOT(on_actionHeading3_triggered())); tFormatMenu->addAction(actionHeading3); addAction(actionHeading3); QAction * actionHeading4 = new QAction(tr("Heading 4"), this); actionHeading4->setShortcut(Qt::CTRL + Qt::Key_4); connect(actionHeading4, SIGNAL(triggered()), this, SLOT(on_actionHeading4_triggered())); tFormatMenu->addAction(actionHeading4); addAction(actionHeading4); QAction * actionHeading5 = new QAction(tr("Heading 5"), this); actionHeading5->setShortcut(Qt::CTRL + Qt::Key_5); connect(actionHeading5, SIGNAL(triggered()), this, SLOT(on_actionHeading5_triggered())); tFormatMenu->addAction(actionHeading5); addAction(actionHeading5); QAction * actionHeading6 = new QAction(tr("Heading 6"), this); actionHeading6->setShortcut(Qt::CTRL + Qt::Key_6); connect(actionHeading6, SIGNAL(triggered()), this, SLOT(on_actionHeading6_triggered())); tFormatMenu->addAction(actionHeading6); addAction(actionHeading6); tFormatMenu->addSeparator(); QAction * actionBlockQuote = new QAction(tr("Block Quote"), this); actionBlockQuote->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B); connect(actionBlockQuote, SIGNAL(triggered()), this, SLOT(on_actionBlockQuote_triggered())); tFormatMenu->addAction(actionBlockQuote); addAction(actionBlockQuote); tFormatMenu->addSeparator(); QAction * actionUnorderedList = new QAction(tr("UnorderedList"), this); connect(actionUnorderedList, SIGNAL(triggered()), this, SLOT(on_actionUnorderedList_triggered())); tFormatMenu->addAction(actionUnorderedList); addAction(actionUnorderedList); QAction * actionOrderedList = new QAction(tr("Ordered List"), this); connect(actionOrderedList, SIGNAL(triggered()), this, SLOT(on_actionOrderedList_triggered())); tFormatMenu->addAction(actionOrderedList); addAction(actionOrderedList); tFormatMenu->addSeparator(); QAction * actionIncreaseIndent = new QAction(tr("Increase Indent"), this); actionIncreaseIndent->setShortcut(Qt::CTRL + Qt::Key_M); connect(actionIncreaseIndent, SIGNAL(triggered()), this, SLOT(on_actionIncreaseIndent_triggered())); tFormatMenu->addAction(actionIncreaseIndent); addAction(actionIncreaseIndent); QAction * actionDecreaseIndent = new QAction(tr("Decrease Indent"), this); actionDecreaseIndent->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_M); connect(actionDecreaseIndent, SIGNAL(triggered()), this, SLOT(on_actionDecreaseIndent_triggered())); tFormatMenu->addAction(actionDecreaseIndent); addAction(actionDecreaseIndent); QAction * actionIncreaseFirstIndent = new QAction(tr("Increase First Line Indent"), this); actionIncreaseFirstIndent->setShortcut(Qt::CTRL + Qt::Key_T); connect(actionIncreaseFirstIndent, SIGNAL(triggered()), this, SLOT(on_actionIncreaseFirstIndent_triggered())); tFormatMenu->addAction(actionIncreaseFirstIndent); addAction(actionIncreaseFirstIndent); QAction * actionDecreaseFirstIndent = new QAction(tr("Decrease First Line Indent"), this); actionDecreaseFirstIndent->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_T); connect(actionDecreaseFirstIndent, SIGNAL(triggered()), this, SLOT(on_actionDecreaseFirstIndent_triggered())); tFormatMenu->addAction(actionDecreaseFirstIndent); addAction(actionDecreaseFirstIndent); tFormatMenu->addSeparator(); QAction * actionClearBlock = new QAction(tr("&Clear Formatting"), this); //actionClearBlock->setShortcut(Qt::CTRL + Qt::Key_C); connect(actionClearBlock, SIGNAL(triggered()), this, SLOT(on_actionClearBlock_triggered())); tFormatMenu->addAction(actionClearBlock); addAction(actionClearBlock); // // Menu View: // QAction * actionPreview = new QAction(tr("Preview"), this); // actionPreview->setShortcut(QKeySequence(tr("Ctrl+P"))); // connect(actionPreview, SIGNAL(triggered()), this, SLOT(on_actionPreview_triggered())); // tViewMenu->addAction(actionPreview); // addAction(actionPreview); // actionCountWords = new QAction(tr("Count Words"), this); // //actionPreview->setShortcut(QKeySequence(tr("Ctrl+P"))); // connect(actionCountWords, SIGNAL(triggered()), this, SLOT(on_actionCountWords_triggered())); // tViewMenu->addAction(actionCountWords); // addAction(actionCountWords); QAction * actionPreferences = new QAction(tr("Preferences"), this); //actionPreview->setShortcut(QKeySequence(tr("Ctrl+P"))); connect(actionPreferences, SIGNAL(triggered()), this, SLOT(on_actionPreferences_triggered())); tViewMenu->addAction(actionPreferences); addAction(actionPreferences); // // Menu Help: QAction * actionAbout = new QAction(tr("About"), this); connect(actionAbout, SIGNAL(triggered()), this, SLOT(on_actionAbout_triggered())); tHelpMenu->addAction(actionAbout); addAction(actionAbout); return true; } bool QuaTextEdit::QuaSetUpHashReplacement() { QFile tFile("HashReplacement.ini"); if ( !tFile.open(QIODevice::ReadOnly) ) { return false; } mHashReplacement.clear(); QTextStream tTextStream(&tFile); while ( !tTextStream.atEnd() ) { QString tString = tTextStream.readLine(); QStringList tStringList = tString.split(","); mHashReplacement[tStringList.at(0)] = tStringList.at(1); } tFile.close(); return true; } // // File Menu // void QuaTextEdit::on_actionNew_triggered() { signal_actionNew(); } void QuaTextEdit::on_actionOpen_triggered() { signal_actionOpen(); } void QuaTextEdit::on_actionSave_triggered() { signal_actionSave(); } void QuaTextEdit::on_actionSaveAs_triggered() { signal_actionSaveAs(); } void QuaTextEdit::on_actionQuit_triggered() { signal_actionQuit(); } // // Edit Menu void QuaTextEdit::on_actionPastePlainText_triggered() { this->textCursor().insertText(QApplication::clipboard()->text()); this->ensureCursorVisible(); } // // Insert Menu: void QuaTextEdit::on_actionInsertHorizontalLine_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.insertHtml( "<hr>" ); } // // Format Menu void QuaTextEdit::on_actionTextBold_triggered() { QTextCharFormat tTextCharFormat; QTextCursor tTextCursor = this->textCursor(); if (!tTextCursor.hasSelection()) { tTextCursor.select(QTextCursor::WordUnderCursor); } else { int tStartSelection = tTextCursor.selectionStart(); int tEndSelection = tTextCursor.selectionEnd(); tTextCursor.setPosition(tStartSelection, QTextCursor::MoveAnchor); tTextCursor.setPosition(tEndSelection, QTextCursor::KeepAnchor); } if ( !tTextCursor.charFormat().font().bold() ) { tTextCharFormat.setFontWeight(QFont::Bold); //actionTextBold->setChecked(true); } else { tTextCharFormat.setFontWeight(QFont::Normal); //actionTextBold->setChecked(false); } tTextCursor.mergeCharFormat(tTextCharFormat); } void QuaTextEdit::on_actionTextItalic_triggered() { QTextCharFormat tTextCharFormat; QTextCursor tTextCursor = this->textCursor(); if (!tTextCursor.hasSelection()) { tTextCursor.select(QTextCursor::WordUnderCursor); } else { int tStartSelection = tTextCursor.selectionStart(); int tEndSelection = tTextCursor.selectionEnd(); tTextCursor.setPosition(tStartSelection, QTextCursor::MoveAnchor); tTextCursor.setPosition(tEndSelection, QTextCursor::KeepAnchor); } if ( !tTextCursor.charFormat().font().italic() ) { tTextCharFormat.setFontItalic(true); //actionTextItalic->setChecked(true); } else { tTextCharFormat.setFontItalic(false); //actionTextItalic->setChecked(false); } tTextCursor.mergeCharFormat(tTextCharFormat); } void QuaTextEdit::on_actionTextUnderline_triggered() { QTextCharFormat tTextCharFormat; QTextCursor tTextCursor = this->textCursor(); if (!tTextCursor.hasSelection()) { tTextCursor.select(QTextCursor::WordUnderCursor); } else { int tStartSelection = tTextCursor.selectionStart(); int tEndSelection = tTextCursor.selectionEnd(); tTextCursor.setPosition(tStartSelection, QTextCursor::MoveAnchor); tTextCursor.setPosition(tEndSelection, QTextCursor::KeepAnchor); } if ( !tTextCursor.charFormat().font().underline() ) { tTextCharFormat.setFontUnderline(true); //actionTextUnderline->setChecked(true); } else { tTextCharFormat.setFontUnderline(false); //actionTextUnderline->setChecked(false); } tTextCursor.mergeCharFormat(tTextCharFormat); } void QuaTextEdit::on_actionTextStrikeOut_triggered() { QTextCharFormat tTextCharFormat; QTextCursor tTextCursor = this->textCursor(); if (!tTextCursor.hasSelection()) { tTextCursor.select(QTextCursor::WordUnderCursor); } else { int tStartSelection = tTextCursor.selectionStart(); int tEndSelection = tTextCursor.selectionEnd(); tTextCursor.setPosition(tStartSelection, QTextCursor::MoveAnchor); tTextCursor.setPosition(tEndSelection, QTextCursor::KeepAnchor); } if ( !tTextCursor.charFormat().font().strikeOut() ) { tTextCharFormat.setFontStrikeOut(true); //actionTextUnderline->setChecked(true); } else { tTextCharFormat.setFontStrikeOut(false); //actionTextUnderline->setChecked(false); } tTextCursor.mergeCharFormat(tTextCharFormat); } void QuaTextEdit::on_actionTextJustify_triggered() { this->setAlignment(Qt::AlignJustify); } void QuaTextEdit::on_actionTextLeft_triggered() { this->setAlignment(Qt::AlignLeft); } void QuaTextEdit::on_actionTextCenter_triggered() { this->setAlignment(Qt::AlignHCenter); } void QuaTextEdit::on_actionTextRight_triggered() { this->setAlignment(Qt::AlignRight); } void QuaTextEdit::on_actionTextSuperScript_triggered() { QTextCharFormat tTextCharFormat; QTextCursor tTextCursor = this->textCursor(); if (!tTextCursor.hasSelection()) { tTextCursor.select(QTextCursor::WordUnderCursor); } else { int tStartSelection = tTextCursor.selectionStart(); int tEndSelection = tTextCursor.selectionEnd(); tTextCursor.setPosition(tStartSelection, QTextCursor::MoveAnchor); tTextCursor.setPosition(tEndSelection, QTextCursor::KeepAnchor); } if ( !(tTextCursor.charFormat().verticalAlignment() == QTextCharFormat::AlignSuperScript) ) { tTextCharFormat.setVerticalAlignment(QTextCharFormat::AlignSuperScript); //actionTextSuperScript->setChecked(true); } else { tTextCharFormat.setVerticalAlignment(QTextCharFormat::AlignNormal); //actionTextSuperScript->setChecked(false); } tTextCursor.mergeCharFormat(tTextCharFormat); } void QuaTextEdit::on_actionTextSubScript_triggered() { QTextCharFormat tTextCharFormat; QTextCursor tTextCursor = this->textCursor(); if (!tTextCursor.hasSelection()) { tTextCursor.select(QTextCursor::WordUnderCursor); } else { int tStartSelection = tTextCursor.selectionStart(); int tEndSelection = tTextCursor.selectionEnd(); tTextCursor.setPosition(tStartSelection, QTextCursor::MoveAnchor); tTextCursor.setPosition(tEndSelection, QTextCursor::KeepAnchor); } if ( !(tTextCursor.charFormat().verticalAlignment() == QTextCharFormat::AlignSubScript) ) { tTextCharFormat.setVerticalAlignment(QTextCharFormat::AlignSubScript); //actionTextSubScript->setChecked(true); } else { tTextCharFormat.setVerticalAlignment(QTextCharFormat::AlignNormal); //actionTextSubScript->setChecked(false); } tTextCursor.mergeCharFormat(tTextCharFormat); } void QuaTextEdit::on_actionHeading1_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.select(QTextCursor::BlockUnderCursor); tTextCursor.insertHtml( "<h1>" + tTextCursor.selectedText() + "</h1>" ); } void QuaTextEdit::on_actionHeading2_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.select(QTextCursor::BlockUnderCursor); tTextCursor.insertHtml( "<h2>" + tTextCursor.selectedText() + "</h2>" ); } void QuaTextEdit::on_actionHeading3_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.select(QTextCursor::BlockUnderCursor); tTextCursor.insertHtml( "<h3>" + tTextCursor.selectedText() + "</h3>" ); } void QuaTextEdit::on_actionHeading4_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.select(QTextCursor::BlockUnderCursor); tTextCursor.insertHtml( "<h4>" + tTextCursor.selectedText() + "</h4>" ); } void QuaTextEdit::on_actionHeading5_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.select(QTextCursor::BlockUnderCursor); tTextCursor.insertHtml( "<h5>" + tTextCursor.selectedText() + "</h5>" ); } void QuaTextEdit::on_actionHeading6_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.select(QTextCursor::BlockUnderCursor); tTextCursor.insertHtml( "<h6>" + tTextCursor.selectedText() + "</h6>" ); } void QuaTextEdit::on_actionBlockQuote_triggered() { QTextCursor tTextCursor = this->textCursor(); tTextCursor.select(QTextCursor::BlockUnderCursor); tTextCursor.insertHtml( "<blockquote>" + tTextCursor.selectedText() + "</blockquote>" ); } void QuaTextEdit::on_actionClearBlock_triggered() { QTextCharFormat tTextCharFormat; tTextCharFormat.setFontFamily("Arial Unicode MS"); QTextCursor tTextCursor = this->textCursor(); if (!tTextCursor.hasSelection()) { tTextCursor.select(QTextCursor::WordUnderCursor); } tTextCursor.mergeCharFormat(tTextCharFormat); } void QuaTextEdit::on_actionUnorderedList_triggered() { QTextCursor cursor = this->textCursor(); QTextListFormat::Style style = QTextListFormat::ListDisc; cursor.beginEditBlock(); QTextBlockFormat blockFmt = cursor.blockFormat(); QTextListFormat listFmt; if ( cursor.currentList() ) { listFmt = cursor.currentList()->format(); } else { listFmt.setIndent(blockFmt.indent() + 1); blockFmt.setIndent(0); cursor.setBlockFormat(blockFmt); } listFmt.setStyle(style); cursor.createList(listFmt); cursor.endEditBlock(); } void QuaTextEdit::on_actionOrderedList_triggered() { QTextCursor cursor = this->textCursor(); QTextListFormat::Style style = QTextListFormat::ListDecimal; cursor.beginEditBlock(); QTextBlockFormat blockFmt = cursor.blockFormat(); QTextListFormat listFmt; if ( cursor.currentList() ) { listFmt = cursor.currentList()->format(); } else { listFmt.setIndent(blockFmt.indent() + 1); blockFmt.setIndent(0); cursor.setBlockFormat(blockFmt); } listFmt.setStyle(style); cursor.createList(listFmt); cursor.endEditBlock(); } void QuaTextEdit::on_actionIncreaseIndent_triggered() { QTextCursor tTextCursor = this->textCursor(); QTextBlockFormat tTextBlockFormat = tTextCursor.blockFormat(); tTextBlockFormat.setLeftMargin(tTextBlockFormat.leftMargin() + 40); tTextCursor.mergeBlockFormat(tTextBlockFormat); } void QuaTextEdit::on_actionDecreaseIndent_triggered() { QTextCursor tTextCursor = this->textCursor(); QTextBlockFormat tTextBlockFormat = tTextCursor.blockFormat(); tTextBlockFormat.setLeftMargin(tTextBlockFormat.leftMargin() - 40); tTextCursor.mergeBlockFormat(tTextBlockFormat); } void QuaTextEdit::on_actionIncreaseFirstIndent_triggered() { QTextCursor tTextCursor = this->textCursor(); QTextBlockFormat tTextBlockFormat = tTextCursor.blockFormat(); tTextBlockFormat.setTextIndent( tTextBlockFormat.textIndent() + this->tabStopWidth() ); tTextCursor.mergeBlockFormat(tTextBlockFormat); } void QuaTextEdit::on_actionDecreaseFirstIndent_triggered() { QTextCursor tTextCursor = this->textCursor(); QTextBlockFormat tTextBlockFormat = tTextCursor.blockFormat(); tTextBlockFormat.setTextIndent( tTextBlockFormat.textIndent() - this->tabStopWidth() ); tTextCursor.mergeBlockFormat(tTextBlockFormat); } // // View Menu // void QuaTextEdit::on_actionPreferences_triggered() { IBFDialogPreferences tDialogPreferences(this); QObject::connect(&tDialogPreferences, SIGNAL(finished(int)), this, SLOT(on_actionPreferencesClose_triggered())); tDialogPreferences.exec(); } void QuaTextEdit::on_actionPreferencesClose_triggered() { // // Load mhash QFile tFile("QNotesPreferences.ini"); if ( !tFile.open(QIODevice::ReadOnly) ) { return ; } mHashReplacement.clear(); QTextStream tTextStream(&tFile); while ( !tTextStream.atEnd() ) { QString tString = tTextStream.readLine(); QStringList tStringList = tString.split(","); mHashReplacement[tStringList.at(0)] = tStringList.at(1); } tFile.close(); } void QuaTextEdit::on_actionAbout_triggered() { QMessageBox msgBox; msgBox.setWindowTitle("About QuaNotebook"); msgBox.setText("<p align=\"justify\">QuaNotebook is a simple note-taking application.<br> Copyright (C) 2015 Iago Bozza Francisco</p>"); msgBox.setInformativeText("<p align=\"justify\">This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p> <p align=\"justify\">This program is distributed in the hope that it will be useful, but without any warrany; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.</p> <p align=\"justify\">You should have received a copy of the GNU General Public License along with this program. If not, see <a href=\"http://www.gnu.org/licenses/\">http://www.gnu.org/licenses/</a>.</p>"); msgBox.setIconPixmap(QPixmap(":/images/notepad.png")); msgBox.setStandardButtons(QMessageBox::Close); msgBox.setDefaultButton(QMessageBox::Close); msgBox.exec(); }
a0b8efa132ab74070cc7603826d6e9e41ba44476
907f6436352e77ce6fd18e1e429333b743791d5e
/problem_8_lemons/lemons.cpp
dae9a396c18af12c191274fb819be113715afe1d
[]
no_license
epsilon-0/Heuristic-Problem-Solving
9767853261d4bca7ef558196e7f527d417f9702c
95c80ea9061add5d3509de50445768b29a23aaf3
refs/heads/master
2021-01-21T21:54:31.326956
2018-10-05T20:39:44
2018-10-05T20:39:44
30,309,855
0
1
null
null
null
null
UTF-8
C++
false
false
3,062
cpp
lemons.cpp
#include "edmondskarp.hh" #include "fastflow.hh" #include <cassert> #include <cstdio> #include <iostream> #include <numeric> #include <vector> using namespace std; typedef double TYPE; const TYPE MULT = 1; vector<vector<int>> assets(0); vector<int> degrees; int N, M, D, n[2], m[2], d[2]; vector<vector<int>> network; vector<vector<double>> capacities; int get_input() { scanf("%d %d %d\n", &N, &M, &D); scanf("%d-%d %d-%d %d-%d", n + 0, n + 1, m + 0, m + 1, d + 0, d + 1); int val; assets.resize(N); for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { scanf("%d", &val); assets[i].push_back(val); } } for (int i = 0; i < N; i++) { degrees.push_back(accumulate(assets[i].begin(), assets[i].end(), 0)); } for (int i = 0; i < M; i++) { degrees.push_back(D); } return 42; } int make_network() { network.clear(); network.resize(2 + M + N); capacities.clear(); capacities.resize(2 + M + N, vector<double>(2 + M + N, 0)); for (int i = 0; i < N + M; i++) { network[0].push_back(i + 1); capacities[0][i + 1] = M * D; } for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { if (assets[i][j]) { network[i + 1].push_back(j + 1); capacities[i + 1][j + 1] = 1; network[j + 1].push_back(i + 1); capacities[j + 1][i + 1] = 1; } } network[i + 1].push_back(N + M + 1); } return 42; } int make_capacities(double g) { for (int i = 1; i < N + M + 1; i++) { capacities[i][N + M + 1] = M * D + 2 * g - (network[i].size() - 1); } return 42; } vector<bool> get_subgraph() { TYPE l = 0, u = (TYPE)M * D * MULT, g; vector<bool> subg, S; int cnt; while (u - l > 1) { g = (u + l) / 2; // make network with g Dinitz dnt(1, N + M + 2, N + M + 2); for (int i = 2; i <= N + M + 1; i++) { dnt.add(1, i, (TYPE)M * D * MULT); dnt.add(i, 1, 0); dnt.add(i, N + M + 2, (TYPE)(M * D - degrees[i - 2]) * MULT + 2 * g); dnt.add(N + M + 2, i, 0); } for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { if (assets[i][j]) { dnt.add(i + 2, N + j + 2, MULT); dnt.add(N + j + 2, i + 2, MULT); } } } cout << "----------------------------------" << endl; // get mincut dnt.dinitz(); S = dnt.getMinCut(); assert(S[1]); cnt = 0; for (int i = 1; i <= N + M + 2; i++) { if (S[i]) { cnt++; } } cout << cnt << endl; if (cnt == 1) { u = g; } else { cout << "wtf now" << endl; l = g; subg = S; } } subg.pop_back(); subg.erase(subg.begin() + 0); subg.erase(subg.begin() + 0); return subg; } int main() { get_input(); vector<bool> densest = get_subgraph(); int cnt = 0; cout << "over here now" << endl; cout << densest.size() << endl; for (int i = 0; i < densest.size(); i++) { if (densest[i]) { cout << i << endl; cnt++; } } cout << "here" << endl; cout << cnt << " " << densest.size() << endl; }
ec0e62297721cd5fcc62d348a530f1c3e447acf0
0b05f9467a03d250d75f57d2f107281bf86605ce
/Ryu Jong Chan/Ryu Jong Chan/Scene.h
d862863d5ff51757a9ee740dd6fe75bf07a08b3f
[]
no_license
RyuJongChan/GitHub_Ryu
ca13317b79ac6d9805dba26ea6d8b174ee192bf0
d268f1d17b03290dac6e6107cec33f2fd0a0ef53
refs/heads/master
2020-05-14T15:28:44.840870
2019-04-19T08:53:01
2019-04-19T08:53:01
181,852,855
0
0
null
null
null
null
UTF-8
C++
false
false
233
h
Scene.h
#pragma once class Scene { private: public: Scene(); virtual ~Scene(); virtual void init(); virtual void update(); virtual void checkCol(); virtual void draw(); virtual void clear(); virtual void exit(); };
6bf1148c066ea0ae4f29ea934050fcc3bba771cb
3f3a42f429f8bcd769644148b24c3b0e6e2589ed
/U2_3D/Src/U2Main.cpp
74daf71bed19b1b3217151487deaf700f3d5bce0
[]
no_license
DanielNeander/my-3d-engine
d10ad3e57a205f6148357f47467b550c7e0e0f33
7f0babbfdf0b719ea4b114a89997d3e52bcb2b6c
refs/heads/master
2021-01-10T17:58:25.691360
2013-04-24T07:37:31
2013-04-24T07:37:31
53,236,587
3
0
null
null
null
null
UTF-8
C++
false
false
2,371
cpp
U2Main.cpp
#include <U2_3D/Src/U23DLibPCH.h> #include "U2Main.h" extern int LuaCmd_NewN2Mesh(lua_State* pLua); U2Main::InitializerArray* U2Main::ms_Initializers = 0; U2Main::TerminatorArray* U2Main::ms_Terminators = 0; bool U2Main::ms_bInitAllocator = false; U2Allocator* U2Main::ms_pAllocator = 0; void U2Main::AddInitializer(Initializer oInitialize) { if(-1 == ms_Initializers->Find(oInitialize)) { ms_Initializers->AddElem(oInitialize); } } void U2Main::Initialize() { static int counter = 0; if(counter++ == 0) { U2MemoryMgr::Init(); FILELog::Init(); FILELog::ReportingLevel() = FILELog::FromString(_T("DEBUG")); ms_Initializers = U2_NEW InitializerArray; ms_Terminators = U2_NEW TerminatorArray; //ms_pAllocator = new U2DefaultAllocator(); ms_bInitAllocator = true; U2ScriptCmdMgr::Create(); ::RegisterAllWithLua(ScriptMgr->GetLuaMgr()->masterState); ScriptMgr->RegLuaFunc(LuaCmd_NewN2Mesh, "NewN2Mesh"); U2_NEW U2VariableMgr; U2FileMgr::Create(); U2AnimFactory::Create(); U2AlphaState::RegisterInitialize(); U2MaterialState::RegisterInitialize(); U2StencilState::RegisterInitialize(); U2ZBufferState::RegisterInitialize(); U2WireframeState::RegisterInitialize(); U2AlphaState::RegisterTerminate(); U2ZBufferState::RegisterTerminate(); U2MaterialState::RegisterTerminate(); U2StencilState::RegisterTerminate(); U2WireframeState::RegisterTerminate(); U2ShaderConstant::RegisterInitialize(); U2ShaderConstant::RegisterTerminate(); for(uint32 i=0; i < ms_Initializers->Size(); ++i) { (*ms_Initializers->GetElem(i))(); } ms_Initializers->RemoveAll(); } } void U2Main::AddTerminator(Terminator oTerminate) { if(-1 == ms_Terminators->Find(oTerminate)) { ms_Terminators->AddElem(oTerminate); } } void U2Main::Terminate () { //if(ms_bInitAllocator) // delete ms_pAllocator; for(uint32 i=0; i < ms_Terminators->Size(); ++i) { (*ms_Terminators->GetElem(i))(); } ms_Terminators->RemoveAll(); U2_DELETE ms_Initializers; ms_Initializers = 0; U2_DELETE ms_Terminators; ms_Terminators = 0; U2FileMgr::Terminate(); U2VariableMgr::Terminate(); U2AnimFactory::Terminate(); //U2PoolShutdown(size_t); U2MemoryMgr::Terminate(); }
7009ae9b5389736d2bf6457e3da99f1348f1b713
462a2b5357bfb78018258421111f91aab7ba60eb
/NetworkGame/NetworkGame/Device/Graphics/Buffer/Constant/DirectionalLightCBufferStruct.h
8420d63284a27496bae73606c337f21ab8d0bb8b
[]
no_license
matsumoto0112/network
fbd07f7cbec00ab10341a6cda18e22a290882302
bfd9b5cdd9658d321069d13e38cf92ebc7e6f490
refs/heads/master
2020-06-22T18:04:11.901342
2019-07-24T05:10:19
2019-07-24T05:10:19
197,764,957
0
0
null
null
null
null
SHIFT_JIS
C++
false
false
440
h
DirectionalLightCBufferStruct.h
#pragma once #include "Device/Graphics/Color4.h" #include "Utility/Math/Vector3.h" namespace Graphics { /** * @struct DirectionalLightCBufferStruct * @brief ディレクショナルライトのコンスタントバッファ用構造体 */ struct DirectionalLightCBufferStruct { public: Color4 color; //!< 色 Math::Vector3 direction; //!< ライトの向き private: float dummy; //!< パッキング対策 }; } //Graphics
dc87876d2220f07efe6ddf3cf006ab6c6f1f5af1
e4a38bf0acce19c7efa5866dd3ac1498b2ddfd52
/P1007 独木桥/P1007 独木桥/源.cpp
3e59ed08f910bf54f8ac75ed925c0fdfe7130bbd
[]
no_license
XieJiongyan/LuoguSolver
6527747a262b675f6c586e899181db20b450b3a9
17d24f8d3a59d23f2efbc10eedf91041d70757db
refs/heads/master
2022-11-28T21:16:32.640382
2020-08-08T06:49:48
2020-08-08T06:49:48
282,229,369
4
2
null
null
null
null
UTF-8
C++
false
false
548
cpp
源.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace::std; int main() { long n = 0, l = 0; cin >> l >> n; if (!n) { cout << "0 0" << endl; return 0; } vector<long> v(n); for (auto i = v.begin(); i < v.end(); ++i) cin >> *i; long mi = *min_element(v.begin(), v.end()); long ma = *max_element(v.begin(), v.end()); for (auto i = v.begin(); i < v.end(); ++i) if (*i > l / 2) *i = l +1 - *i; cout << *max_element(v.begin(), v.end()) << ' ' << max(l - mi + 1, ma) << endl; system("pause"); return 0; }
bc4db495484e70fab2d092173a0ff8f09ea847e6
5dfbc4c0229d8efd2564d6789a7557119fb32b14
/src/examples/out_of_range.hpp
37ddfe7004e121525d979ba173dd6872ccdb1c1d
[]
no_license
olegpublicprofile/exc_loc
62e5a5d80a6bf8dc372605cab81c67bf29f8036f
f221c682576defa080505fce68ec022e56fe7269
refs/heads/master
2023-05-05T16:41:43.324529
2021-05-23T15:46:19
2021-05-23T15:46:19
370,091,124
0
0
null
null
null
null
UTF-8
C++
false
false
401
hpp
out_of_range.hpp
#pragma once //------------------------------------------------------------------------------ namespace examples { //------------------------------------------------------------------------------ void run_example_out_of_range(); //------------------------------------------------------------------------------ } //------------------------------------------------------------------------------
4df9bfe7fa88675f4278c15a3d758a3c31b0930a
9d9895a4f36fc3b8f745374cc9bf4f609cf758b3
/string_bonacci.cpp
9dbfb8b832ecee58ad8d672672d2ac8a132d6d11
[]
no_license
saif1642/Competitive-Programming-Solving
edf600e5f246f98c2a0e7181daa17d247ac63d8a
0d8f537419b1662f6f576820b807a9a67d62f8e2
refs/heads/master
2020-03-06T20:39:10.687943
2018-03-27T23:46:22
2018-03-27T23:46:22
127,058,373
0
0
null
null
null
null
UTF-8
C++
false
false
537
cpp
string_bonacci.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long vector <string> dp[80]; string fn( int n ) { if( n == 0 ) { dp[0]="a"; return dp[0]; } if( n == 1 ) { dp[1]="b"; return dp[1]; } if(dp[n]!=-1) return dp[n]; else{ dp[n]=f(n-2)+f(n-1); return dp[n]; } } int main(){ int t,n,i; cin>>t; for(int j=1;j<=t;j++){ memset(dp,-1,sizeof(dp)); cin>>n>>i; string res=f(n); cout<<res[i]; } }
408e627cd261aa6b0c74806ca41cd94a7ab8d3f5
a9de258fe240fce176d5bba1ddd6147729893c59
/src/display/interface/otherWindows/game_window/game_classes/sfPlayer.hpp
d4057478e6f1b75eee87e5f39d99489c44ab5f6a
[]
no_license
WendyMonfroy/ZZGameMaker
baa4e98edc402f06673c51eb5c9afa655b0ea9bb
816eb2ffee9f5a37c49313fe05181921269757a7
refs/heads/master
2020-11-25T12:31:50.106416
2020-03-30T00:45:32
2020-03-30T00:45:32
228,662,518
0
0
null
null
null
null
UTF-8
C++
false
false
643
hpp
sfPlayer.hpp
#ifndef ZZMAKER_SFPLAYER_HPP #define ZZMAKER_SFPLAYER_HPP #include <SFML/Graphics.hpp> #include <iostream> #include "sfElement.hpp" #include "sfEnemy.hpp" class SFPlayer : public SFElement { public: SFPlayer() = default; SFPlayer(std::string path, int posX, int posY, std::string name, int health, int max_health, int strength, float speed); public: std::string _name; int _maxHealth; int _health; int _strength; float _speed; int _score; public: bool collidesWithItem(std::list<SFElement*> & sfItems); void hitEnemy(std::list<SFEnemy*> & sfEnemy, float & jump); }; #endif //ZZMAKER_SFPLAYER_HPP
8b7111747d9a57eb9e28a6b1c7591933cd9d3a14
de2dd1ca927a3dc401c034efba8699e6346e0bd1
/src/win_data_utils.cpp
210e643a32f0f46fb70bd7027738e80f52d5d689
[ "MIT" ]
permissive
kcwongjoe/joelib-cpp
77aa606bac58c35c718ec6c952897104a3f2ef53
bf02cb13a23397f6a20461a7e1b3632dc477c0cf
refs/heads/master
2023-04-15T17:31:33.780326
2021-04-30T03:52:31
2021-04-30T03:52:31
348,621,480
0
0
null
null
null
null
UTF-8
C++
false
false
2,783
cpp
win_data_utils.cpp
#include "win_data_utils.h" namespace Utils { /** * @brief Convert LTPSTR/LPWSTR to string * * @param str LPTSTR * @return std::string Return string * @date 2021-03-17 */ std::string to_string(LPTSTR str) { std::string result; #ifdef _UNICODE std::wstring wstr(str); result = std::string(wstr.begin(), wstr.end()); #else result = str; #endif return result; } /** * @brief Convert LPWSTR to string * * @param str LPWSTR * @return std::string Return string * @date 2021-03-17 */ std::string to_string(LPWSTR str) { std::string result; std::wstring wstr(str); result = std::string(wstr.begin(), wstr.end()); return result; } #pragma region To_LPCSTR /** * @brief Convert string to LPCSTR/LPCWSTR * * @code{.cpp} * auto var = to_lpcstr("some string"); * @endcode * * @param str string * @return LPCSTR Return LPCSTR or LPCWSTR * @date 2021-03-17 */ #ifdef _UNICODE LPCWSTR Utils::toLpcstrAuto(std::string str) { return toLpwstr(str); } #else LPCSTR toLpcstrAuto(std::string str) { return toLpcstr(str); } #endif /** * @brief Convert string to LPCSTR * * @param str string * @return LPCSTR Return LPCSTR or LPCWSTR * @date 2021-03-17 */ LPCSTR toLpcstr(std::string str) { LPCSTR result = str.c_str(); return result; } /** * @brief Convert string to LPCWSTR * * @param str string * @return LPCWSTR Return LPCWSTR * @date 2021-03-17 */ LPCWSTR toLpwstr(std::string str) { LPCWSTR result = std::wstring(str.begin(), str.end()).c_str(); return result; } #pragma endregion To_LPCSTR /** * @brief Convert BSTR to string * @param[in] bstr BSTR * @param[in] cp (Option) CodePage, Default as CP_UTF8 * @return Return string * @date 2021-03-17 */ std::string bstrToString(BSTR bstr, int cp) { std::string result = ""; if (bstr) { // request content length in single-chars through a terminating nullchar in the BSTR. // note: BSTR's support imbedded nullchars, so this will only convert through the first nullchar. int res = WideCharToMultiByte(cp, 0, bstr, -1, NULL, 0, NULL, NULL); if (res > 0) { result.resize(res); WideCharToMultiByte(cp, 0, bstr, -1, &result[0], res, NULL, NULL); } else { // no content. clear target result.clear(); } } return result; } }
f7e2e50d16b75d2a178df4baf0452eb201a7b6ad
daf016b5b46783c80fbf6fb2b0ae4a807bb8bab4
/tessara-project/Source/EventSystem.h
bdfcd900f8fc61c45fbffad509bb7eeb0e8b08e3
[]
no_license
kingnobody8/fs.shardsoftessara
9e718d4b3e3475ba51c6fd2b02cf7a600076eff1
77b8cf0c087ed7f4f02bd646e5ad15c8a877200f
refs/heads/master
2020-04-08T03:12:30.868500
2018-11-24T19:19:32
2018-11-24T19:19:32
158,966,358
0
0
null
null
null
null
UTF-8
C++
false
false
1,233
h
EventSystem.h
/* Author: Jorge Juaneda File: EventSystem.h */ #pragma once #include <map> #include <list> using std::pair; using std::list; using std::multimap; #include "..\\SGD Wrappers\IListener.h" #include "..\\SGD Wrappers\CEvent.h" class CEventSystem { public: static CEventSystem* GetInstance(void) { static CEventSystem instance; return &instance; } void RegisterClient(EVENTID eventID, IListener* pClient); void UnregisterClient(EVENTID eventID, IListener* pClient); void UnregisterClientAll(IListener* pClient); void SendEventNow( EVENTID eventID, void* pData = NULL, void* pDestination = NULL, void* pSender = NULL ); void SendEvent( EVENTID eventID, void* pData = NULL, void* pDestination = NULL, void* pSender = NULL ); void SendUniqueEvent( EVENTID eventID, void* pData = NULL ); bool HasEventTriggered( EVENTID eventID ); void ClearEvents(void); void ProcessEvents(void); void Shutdown(void); private: list<CEvent> m_CurrentEvents; multimap<EVENTID, IListener*> m_Clients; void DispatchEvent(CEvent* pEvent); bool AlreadyReg(EVENTID eventID, IListener* pClient); CEventSystem() {} CEventSystem& operator=(const CEventSystem&); CEventSystem(const CEventSystem&); ~CEventSystem() {} };
ce80f90dca3adc55de575717d15bf6285f79d6aa
a0a0b8066582b112f67ff174589a38e992d03360
/parser/Scheduler/Figure/SingleMeasureFigure.h
19a7c54249b5bdb1369309346211371a756ca560
[]
no_license
ApTyp5/skyBlocks
758ef30ff25965ca254c48e917a4c0bfd7c2dfaf
7494b0832a9d2326366614d833dea8faaadd4990
refs/heads/master
2020-08-04T01:06:20.991385
2019-12-22T09:45:44
2019-12-22T09:45:44
211,946,448
2
0
null
2019-12-22T09:45:45
2019-09-30T20:06:49
C++
UTF-8
C++
false
false
820
h
SingleMeasureFigure.h
// // Created by arthur on 22.11.2019. // #ifndef PARSER_SCHEDULER_FIGURE_SINGLEMEASUREFIGURE_H_ #define PARSER_SCHEDULER_FIGURE_SINGLEMEASUREFIGURE_H_ #include <utility> #include "AFigure.h" class SingleMeasureFigure: public AFigure { public: SingleMeasureFigure(Point begin, Point end, std::string text, size_t page) : AFigure(std::move(text), page), begin(begin), end(end) {} Point getBegin() const { return begin; } Point getEnd() const { return end; } bool isSingleMeasureFigure() const { return true; } protected: Point begin, end; friend class FEmborderScheduler_pushForkLines_Test; friend class FEmborderScheduler_connectForkPartsRightPageLess_Test; }; #endif //PARSER_SCHEDULER_FIGURE_SINGLEMEASUREFIGURE_H_
c577737b52377871b347f976983e26349e379107
ccc2dceeffa8078883f2971ea145779fc1dcf34e
/LONG CHALLENGES/April Challenge 2018 Division 2/p2.cpp
4f044126f0536558dda3db346e226f1a5ef53866
[]
no_license
dineshsonachalam/competitive-programming-2
85bbf8679660b2964ad56a711a6b60e0793148f8
2e85f58427eddd098dbb9e56362232cec8d1968e
refs/heads/master
2020-04-05T17:23:30.347444
2018-11-04T01:48:04
2018-11-04T01:48:04
157,058,120
1
0
null
2018-11-11T07:42:53
2018-11-11T07:42:53
null
UTF-8
C++
false
false
737
cpp
p2.cpp
/* * ******************************************************************************************** * AUTHOR : Akash Kandpal * * Language: C++14 * * Motto : The master has failed more times than the beginner has even tried. * * * IDE used: Atom * * My Domain : http://harrypotter.tech/ * ******************************************************************************************** * */
360c6352928abc950d4c6b4ab1ea5e06af762be9
5b486d48ef1b215808b8da90f74b437713621ffb
/672019222/672019222.cpp
c3c74cc4938d616e75bc7e5a881177f9c579cec0
[]
no_license
alfendio/BOX-with-OpenGL
0ea31b8f6b011484f6505f2933e3c058bb8e2da8
64a88f8108453d8233fce1369f5f605b3e0e5b52
refs/heads/main
2023-06-25T21:43:57.161683
2021-07-26T08:23:34
2021-07-26T08:23:34
389,561,376
0
0
null
null
null
null
UTF-8
C++
false
false
5,786
cpp
672019222.cpp
/*************************************************\ | Grafika Komputer - Teksture | Eko, Asp, & Hin | | Press 'c' to draw the cube or press 'b' to draw a flat box | (Cube is drawn on default) /*************************************************/ #include <GL\Glut.h> #include <IOSTREAM.h> #include "TextureObjects.h" #define FILE_TEXTURE1 "PicFTI.bmp" TextureSystem Textures; float xy_aspect; //aspect ratio variable GLfloat RotateX; // X Rotation GLfloat RotateY; // Y Rotation GLfloat RotateZ; // Z Rotation UINT TextureObjects[1]; // Storage for the Texture(s) bool Draw_Cube = true; bool Draw_Box = false; GLvoid DrawBox(UINT mTexture) { glPushMatrix(); //Rotate the matrix by the rotation variables glRotatef(RotateX, 1.0f, 0.0f, 0.0f); glRotatef(RotateY, 0.0f, 1.0f, 0.0f); glRotatef(RotateZ, 0.0f, 0.0f, 1.0f); //bind the texture glBindTexture(GL_TEXTURE_2D, mTexture); // Display a quad texture to the screen glBegin(GL_QUADS); // Display the top left vertice glTexCoord2f(0.0f, 1.0f); glVertex3f(-1, 1, 0); // Display the bottom left vertice glTexCoord2f(0.0f, 0.0f); glVertex3f(-1, -1, 0); // Display the bottom right vertice glTexCoord2f(1.0f, 0.0f); glVertex3f(1, -1, 0); // Display the top right vertice glTexCoord2f(1.0f, 1.0f); glVertex3f(1, 1, 0); glEnd(); glPopMatrix(); } GLvoid DrawCube(UINT mTexture) { //Push on the matrix so we can change it then pop it off in the end glPushMatrix(); //Rotate the matrix by the rotation variables glRotatef(RotateX, 1.0f, 0.0f, 0.0f); glRotatef(RotateY, 0.0f, 1.0f, 0.0f); glRotatef(RotateZ, 0.0f, 0.0f, 1.0f); //bind the texture to the object glBindTexture(GL_TEXTURE_2D, mTexture); glBegin(GL_QUADS); // Front Side glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); // Back Side glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(1.0f, -1.0f, -1.0f); // Top Side glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, 1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f, 1.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(1.0f, 1.0f, -1.0f); // Bottom Side glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(1.0f, -1.0f, -1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); // Right Side glTexCoord2f(1.0f, 0.0f); glVertex3f(1.0f, -1.0f, -1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(1.0f, 1.0f, -1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 0.0f); glVertex3f(1.0f, -1.0f, 1.0f); // Left Side glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f); glTexCoord2f(1.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2f(1.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 1.0f); glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f); glEnd(); glPopMatrix(); } void myIdle() { glutPostRedisplay(); } void myDisplay(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-2.0 * xy_aspect, 2.0 * xy_aspect, -2.0, 2.0, 0.01, 100.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); gluLookAt(2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0); //Draw the cube to the screen if (Draw_Cube) { DrawCube(TextureObjects[0]); } if (Draw_Box) { DrawBox(TextureObjects[0]); } //set the rotation a little more RotateX += 0.4f; RotateY += 0.3f; RotateZ += 0.5f; glutSwapBuffers(); } void myResize(int width, int height) { glViewport(0, 0, width, height); //figure out aspect ratio xy_aspect = (float)width / (float)height; if (DEBUG) { cout << "Window Changed to (x,y): " << width << ", " << height << endl; } glutPostRedisplay(); } void myKeyboard(unsigned char key, int x, int y) { switch (key) { case 27: //Escape case 'q': //Q - Key exit(0); break; case 'c': Draw_Cube = true; Draw_Box = false; break; case 'b': Draw_Cube = false; Draw_Box = true; break; default: break; } if (DEBUG) { cout << "Keypress Occured: " << key << endl; } } void main(int argc, char** argv) { cout << "================================" << endl; cout << "| |" << endl; cout << "| Program: Texture Objects.cpp |" << endl; cout << "| By: Eko, Asp, Hin |" << endl; cout << "| |" << endl; cout << "================================" << endl; glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutInitWindowPosition(150, 150); glutInitWindowSize(800, 600); glutCreateWindow("TextureObjects - Simple Texture Loading"); glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background glEnable(GL_TEXTURE_2D); // Enable Texture Mapping ( NEW ) glShadeModel(GL_SMOOTH); // Enable Smooth Shading glClearDepth(1.0f); // Depth Buffer Setup glEnable(GL_DEPTH_TEST); // Enables Depth Testing glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); glutDisplayFunc(myDisplay); glutReshapeFunc(myResize); glutIdleFunc(myIdle); glutKeyboardFunc(myKeyboard); if (!Textures.LoadTexture(TextureObjects[0], FILE_TEXTURE1)) { cout << "TEXTURE FAILED TO LOAD!!!" << endl; } glutMainLoop(); }
c7a16526c21f2c14bdec55cdb0a405a99c82a814
05c3e9966e016c6dda806ce41fa5c7139fe5fdb9
/src/game/components/ticker.cpp
08ab0d15267287ec5583916f816869ff4b31b685
[]
no_license
Bobgy/simple_mc
b541c17dd5eb4341baae4f76c0b28f76a9265235
5c09ed547a0d2f8ef6713021f3198aadc6daad24
refs/heads/master
2020-12-19T19:19:11.161906
2016-08-01T08:46:41
2016-08-01T08:46:41
26,166,913
0
0
null
null
null
null
UTF-8
C++
false
false
729
cpp
ticker.cpp
#include "stdafx.h" #include "ticker.h" #include "game/entity.h" Ticker::~Ticker() { // do nothing } template class TickerBFS<Entity>; template <typename T> TickerBFS<T>::~TickerBFS() { // do nothing } template <typename T> void TickerBFS<T>::tick(flt delta_time) { if (!m_list) return; m_opened.clear(); while (!m_queue.empty()) m_queue.pop(); for (auto u : *m_list) { if (!u) continue; m_queue.push(u); while (!m_queue.empty()) { T *a = m_queue.front(); m_queue.pop(); shared_ptr<vector<T*>> exp = a->getController()->tick_bfs(delta_time); if (!exp) continue; for (auto b : *exp) { if (m_opened.find(b) == m_opened.end()) { m_opened.insert(b); m_queue.push(b); } } } } }
0689f60caa890b54add207a7b8b02035d8ea96df
3ff1fe3888e34cd3576d91319bf0f08ca955940f
/vod/include/tencentcloud/vod/v20180717/model/RebuildMediaTemplate.h
9ceacd1ad1a5d61815a76c4f80ad05a2537a8b36
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-cpp
9f5df8220eaaf72f7eaee07b2ede94f89313651f
42a76b812b81d1b52ec6a217fafc8faa135e06ca
refs/heads/master
2023-08-30T03:22:45.269556
2023-08-30T00:45:39
2023-08-30T00:45:39
188,991,963
55
37
Apache-2.0
2023-08-17T03:13:20
2019-05-28T08:56:08
C++
UTF-8
C++
false
false
18,379
h
RebuildMediaTemplate.h
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef TENCENTCLOUD_VOD_V20180717_MODEL_REBUILDMEDIATEMPLATE_H_ #define TENCENTCLOUD_VOD_V20180717_MODEL_REBUILDMEDIATEMPLATE_H_ #include <string> #include <vector> #include <map> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> #include <tencentcloud/core/AbstractModel.h> #include <tencentcloud/vod/v20180717/model/RebuildVideoInfo.h> #include <tencentcloud/vod/v20180717/model/RebuildAudioInfo.h> #include <tencentcloud/vod/v20180717/model/RebuildMediaTargetVideoStream.h> #include <tencentcloud/vod/v20180717/model/RebuildMediaTargetAudioStream.h> namespace TencentCloud { namespace Vod { namespace V20180717 { namespace Model { /** * 音画质重生模板详情。 */ class RebuildMediaTemplate : public AbstractModel { public: RebuildMediaTemplate(); ~RebuildMediaTemplate() = default; void ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const; CoreInternalOutcome Deserialize(const rapidjson::Value &value); /** * 获取音画质重生模板号。 * @return Definition 音画质重生模板号。 * */ int64_t GetDefinition() const; /** * 设置音画质重生模板号。 * @param _definition 音画质重生模板号。 * */ void SetDefinition(const int64_t& _definition); /** * 判断参数 Definition 是否已赋值 * @return Definition 是否已赋值 * */ bool DefinitionHasBeenSet() const; /** * 获取模板类型,可选值: <li>Preset:系统预置模板;</li> <li>Custom:用户自定义模板。</li> * @return Type 模板类型,可选值: <li>Preset:系统预置模板;</li> <li>Custom:用户自定义模板。</li> * */ std::string GetType() const; /** * 设置模板类型,可选值: <li>Preset:系统预置模板;</li> <li>Custom:用户自定义模板。</li> * @param _type 模板类型,可选值: <li>Preset:系统预置模板;</li> <li>Custom:用户自定义模板。</li> * */ void SetType(const std::string& _type); /** * 判断参数 Type 是否已赋值 * @return Type 是否已赋值 * */ bool TypeHasBeenSet() const; /** * 获取音画质重生模板名称。 * @return Name 音画质重生模板名称。 * */ std::string GetName() const; /** * 设置音画质重生模板名称。 * @param _name 音画质重生模板名称。 * */ void SetName(const std::string& _name); /** * 判断参数 Name 是否已赋值 * @return Name 是否已赋值 * */ bool NameHasBeenSet() const; /** * 获取音画质重生模板描述。 * @return Comment 音画质重生模板描述。 * */ std::string GetComment() const; /** * 设置音画质重生模板描述。 * @param _comment 音画质重生模板描述。 * */ void SetComment(const std::string& _comment); /** * 判断参数 Comment 是否已赋值 * @return Comment 是否已赋值 * */ bool CommentHasBeenSet() const; /** * 获取音画质重生视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @return RebuildVideoInfo 音画质重生视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ RebuildVideoInfo GetRebuildVideoInfo() const; /** * 设置音画质重生视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @param _rebuildVideoInfo 音画质重生视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ void SetRebuildVideoInfo(const RebuildVideoInfo& _rebuildVideoInfo); /** * 判断参数 RebuildVideoInfo 是否已赋值 * @return RebuildVideoInfo 是否已赋值 * */ bool RebuildVideoInfoHasBeenSet() const; /** * 获取音画质重生音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @return RebuildAudioInfo 音画质重生音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ RebuildAudioInfo GetRebuildAudioInfo() const; /** * 设置音画质重生音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @param _rebuildAudioInfo 音画质重生音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ void SetRebuildAudioInfo(const RebuildAudioInfo& _rebuildAudioInfo); /** * 判断参数 RebuildAudioInfo 是否已赋值 * @return RebuildAudioInfo 是否已赋值 * */ bool RebuildAudioInfoHasBeenSet() const; /** * 获取输出视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @return TargetVideoInfo 输出视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ RebuildMediaTargetVideoStream GetTargetVideoInfo() const; /** * 设置输出视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @param _targetVideoInfo 输出视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ void SetTargetVideoInfo(const RebuildMediaTargetVideoStream& _targetVideoInfo); /** * 判断参数 TargetVideoInfo 是否已赋值 * @return TargetVideoInfo 是否已赋值 * */ bool TargetVideoInfoHasBeenSet() const; /** * 获取输出音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @return TargetAudioInfo 输出音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ RebuildMediaTargetAudioStream GetTargetAudioInfo() const; /** * 设置输出音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * @param _targetAudioInfo 输出音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 * */ void SetTargetAudioInfo(const RebuildMediaTargetAudioStream& _targetAudioInfo); /** * 判断参数 TargetAudioInfo 是否已赋值 * @return TargetAudioInfo 是否已赋值 * */ bool TargetAudioInfoHasBeenSet() const; /** * 获取封装格式。可选值:mp4、hls。默认是 mp4。 * @return Container 封装格式。可选值:mp4、hls。默认是 mp4。 * */ std::string GetContainer() const; /** * 设置封装格式。可选值:mp4、hls。默认是 mp4。 * @param _container 封装格式。可选值:mp4、hls。默认是 mp4。 * */ void SetContainer(const std::string& _container); /** * 判断参数 Container 是否已赋值 * @return Container 是否已赋值 * */ bool ContainerHasBeenSet() const; /** * 获取是否去除视频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * @return RemoveVideo 是否去除视频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * */ int64_t GetRemoveVideo() const; /** * 设置是否去除视频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * @param _removeVideo 是否去除视频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * */ void SetRemoveVideo(const int64_t& _removeVideo); /** * 判断参数 RemoveVideo 是否已赋值 * @return RemoveVideo 是否已赋值 * */ bool RemoveVideoHasBeenSet() const; /** * 获取是否去除音频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * @return RemoveAudio 是否去除音频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * */ int64_t GetRemoveAudio() const; /** * 设置是否去除音频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * @param _removeAudio 是否去除音频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 * */ void SetRemoveAudio(const int64_t& _removeAudio); /** * 判断参数 RemoveAudio 是否已赋值 * @return RemoveAudio 是否已赋值 * */ bool RemoveAudioHasBeenSet() const; /** * 获取模板创建时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * @return CreateTime 模板创建时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * */ std::string GetCreateTime() const; /** * 设置模板创建时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * @param _createTime 模板创建时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * */ void SetCreateTime(const std::string& _createTime); /** * 判断参数 CreateTime 是否已赋值 * @return CreateTime 是否已赋值 * */ bool CreateTimeHasBeenSet() const; /** * 获取模板最后修改时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * @return UpdateTime 模板最后修改时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * */ std::string GetUpdateTime() const; /** * 设置模板最后修改时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * @param _updateTime 模板最后修改时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 * */ void SetUpdateTime(const std::string& _updateTime); /** * 判断参数 UpdateTime 是否已赋值 * @return UpdateTime 是否已赋值 * */ bool UpdateTimeHasBeenSet() const; private: /** * 音画质重生模板号。 */ int64_t m_definition; bool m_definitionHasBeenSet; /** * 模板类型,可选值: <li>Preset:系统预置模板;</li> <li>Custom:用户自定义模板。</li> */ std::string m_type; bool m_typeHasBeenSet; /** * 音画质重生模板名称。 */ std::string m_name; bool m_nameHasBeenSet; /** * 音画质重生模板描述。 */ std::string m_comment; bool m_commentHasBeenSet; /** * 音画质重生视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 */ RebuildVideoInfo m_rebuildVideoInfo; bool m_rebuildVideoInfoHasBeenSet; /** * 音画质重生音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 */ RebuildAudioInfo m_rebuildAudioInfo; bool m_rebuildAudioInfoHasBeenSet; /** * 输出视频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 */ RebuildMediaTargetVideoStream m_targetVideoInfo; bool m_targetVideoInfoHasBeenSet; /** * 输出音频控制信息。 注意:此字段可能返回 null,表示取不到有效值。 */ RebuildMediaTargetAudioStream m_targetAudioInfo; bool m_targetAudioInfoHasBeenSet; /** * 封装格式。可选值:mp4、hls。默认是 mp4。 */ std::string m_container; bool m_containerHasBeenSet; /** * 是否去除视频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 */ int64_t m_removeVideo; bool m_removeVideoHasBeenSet; /** * 是否去除音频数据,可选值: <li>0:保留</li> <li>1:去除</li> 默认值 0。 */ int64_t m_removeAudio; bool m_removeAudioHasBeenSet; /** * 模板创建时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 */ std::string m_createTime; bool m_createTimeHasBeenSet; /** * 模板最后修改时间,使用 [ISO 日期格式](https://cloud.tencent.com/document/product/266/11732#I)。 */ std::string m_updateTime; bool m_updateTimeHasBeenSet; }; } } } } #endif // !TENCENTCLOUD_VOD_V20180717_MODEL_REBUILDMEDIATEMPLATE_H_
5e40268f0a3fd28369dccef625de261d164f9360
fa6b91384c3638bbb5dfeb68731ddb457fd8f1fa
/tbn/reduce.hpp
3f4d5c9b65453e538fdb6f3c6a6228c6aabf1efb
[]
no_license
ggm6/TOPL
1a413071caf9991285588ad1f09fa92e8c9de75f
cc9fbfa8bf046c73b91679b9193ca2b7995cb503
refs/heads/master
2020-04-17T04:34:41.829039
2019-05-09T15:03:52
2019-05-09T15:03:52
166,235,638
0
0
null
null
null
null
UTF-8
C++
false
false
3,349
hpp
reduce.hpp
#ifndef REDUCE_HPP_INCLUDED #define REDUCE_HPP_INCLUDED #include <string> #include <vector> #include <typeinfo> #include <assert.h> #include "lang.hpp" using namespace std; template<typename T> bool is_value(T e) { /*Returns true if e is a value (i.e., irreducible).*/ return typeid(e).name() == "BoolExpr" || typeid(e).name() == "IntExpr"; } template<typename T> void is_reducible(T e) {return !is_value(e);} template<typename T1,typename T2> T2 step_unary(T1 e,string op) { if (is_reducible(e.expr)) return step(e.expr); return e.expr.value; } template<typename T1,typename T2> T2 step_binary(T1 e,string op) { if (is_reducible(e.lhs)) step(e.lhs); if (is_reducible(e.rhs)) step(e.rhs); return e.expr.value; } template<typename T> T step_not(T e) { return step_unary(e,"NotExpr"); } template <typename T> T step_and(T e) { return step_binary(e,"AndExpr"); } template <typename T> T step_or(T e) { return step_binary(e,"OrExpr"); } template <typename T> T step_if(T e) { if (is_reducible(e.cond)) return NotExpr(step(e.cond), e.True, e.False); if (e.cond.val) return e.True; else return e.False; } template<typename T1,typename T2> T2 step_add(T1 e) { return step_binary(e,"AddExpr"); } template<typename T1,typename T2> T2 step_sub(T1 e) { return step_binary(e,"SubExpr"); } template<typename T1,typename T2> T2 step_mul(T1 e) { return step_binary(e,"MulExpr"); } template<typename T1,typename T2> T2 step_div(T1 e) { return step_binary(e,"DivExpr"); } template<typename T1,typename T2> T2 step_rem(T1 e) { return step_binary(e,"RemExpr"); } template<typename T1,typename T2> T2 step_eq(T1 e) { return step_binary(e,"EqExpr"); } template<typename T1,typename T2> T2 step_ne(T1 e) { return step_binary(e,"NeExpr"); } template<typename T1,typename T2> T2 step_lt(T1 e) { return step_binary(e,"LtExpr"); } template<typename T1,typename T2> T2 step_gt(T1 e) { return step_binary(e,"GtExpr"); } template<typename T1,typename T2> T2 step_le(T1 e) { return step_binary(e,"LeExpr"); } template<typename T1,typename T2> T2 step_ge(T1 e) { return step_binary(e,"GeExpr"); } template <typename T> T step(T e) { assert(isinstance(e, "Expr")); assert(is_reducible(e)); if (typeid(e).name() == "NotExpr") return step_not(e); if (typeid(e).name() == "AndExpr") return step_and(e); if (typeid(e).name() == "OrExpr") return step_or(e); if (typeid(e).name() == "IfExpr") return step_if(e); if (typeid(e).name() == "AddExpr") return step_add(e); if (typeid(e).name() == "SubExpr") return step_sub(e); if (typeid(e).name() == "MulExpr") return step_mul(e); if (typeid(e).name() == "DivExpr") return step_div(e); if (typeid(e).name() == "RemExpr") return step_rem(e); if (typeid(e).name() == "NegExpr") return step_neg(e); if (typeid(e).name() == "EqExpr") return step_eq(e); if (typeid(e).name() == "NeExpr") return step_ne(e); if (typeid(e).name() == "LtExpr") return step_lt(e); if (typeid(e).name() == "GtExpr") return step_gt(e); if (typeid(e).name() == "LeExpr") return step_le(e); if (typeid(e).name() == "GeExpr") return step_ge(e); } template <typename T> T reduce(T e) { while (is_reducible(e)) e = step(e); return e; } #endif
fa710f442a998fb7dcc115c75cbf123e93eff99a
6b260a7b47d7ffca423bef6e64f49f93f31c38ff
/components/animations/inc/animations/Animation.h
3f999dcd80a482ea2a2d5fd3e8ad55c56976db8e
[ "MIT" ]
permissive
fweiss/badge
9c60525cc9580d27a7885a105fd49413728de0b9
86a7e8e473df32eb1e90aa29db0f35971cab1322
refs/heads/master
2023-05-26T03:57:52.127868
2023-04-30T14:03:45
2023-04-30T14:03:45
54,276,110
3
0
null
null
null
null
UTF-8
C++
false
false
467
h
Animation.h
#pragma once #include <vector> #include "Display.h" class Animation { public: Animation(Display &display); Animation(Display &display, uint16_t framePeriodMilis); virtual ~Animation() {}; virtual void drawFrame() = 0; virtual const std::vector<uint32_t> *frameDump() const; uint16_t getFramePeriodMillis() { return this->framePeriodMillis; } protected: Display &display; uint16_t framePeriodMillis; uint32_t frameIndex = 0; };
8f82475a02142eecbd8a857b240ea8b51f472683
a94da6896d450311cc304f8eb30460bb7a7f2f6b
/src/query_parser.hh
4c12502a0c3115c66a313c1c6f4639ac10dcb078
[ "BSD-3-Clause" ]
permissive
thejk/stuff
42bafaa1ebf583d6b34b0f4e4f8d92383d756503
67362896a37742e880025b9c85c4fe49d690ba02
refs/heads/master
2016-09-05T21:48:17.035253
2016-03-02T19:39:15
2016-03-02T19:39:15
37,096,176
0
0
null
null
null
null
UTF-8
C++
false
false
451
hh
query_parser.hh
#ifndef QUERY_PARSER_HH #define QUERY_PARSER_HH #include <map> #include <string> namespace stuff { class QueryParser { public: static bool parse(const std::string& in, std::map<std::string, std::string>* out); private: QueryParser() {} ~QueryParser() {} QueryParser(const QueryParser&) = delete; QueryParser& operator=(const QueryParser&) = delete; }; } // namespace stuff #endif /* QUERY_PARSER_HH */
037affeefe89b9f6adc908b693337873ab8f363a
38208ef55b1b1e20a3b2e97157461bb5c518fddd
/hw1/maceps/maceps.h
aa0f81372dede696e8eb397fb223ef055561e424
[]
no_license
AmmonHepworth/MATH4610
f19aa432d7c00a9a3a558b5496acde00120d21c9
83ef4ec7e3c4167be1dd48b21c22860e096555db
refs/heads/master
2021-08-06T10:42:09.202960
2018-12-14T16:12:23
2018-12-14T16:12:23
147,474,153
0
0
null
null
null
null
UTF-8
C++
false
false
244
h
maceps.h
#ifndef MACEPS_H #define MACEPS_H template <typename T> T getMacEps() { T value = 1; T litOne = 1.0; T litHalf = 0.5; int precCount = 0; while(litOne + litHalf*value != 1) { ++precCount; value *= litHalf; } return value; } #endif
2e0e12e7d7c58d4313583d0548e25a85b7a43376
e44620035d4d3ced29f50c48862b85c978415f42
/Final/Final/Board.cpp
10e62363b0e98849e6389f4aeb8e09170511cb95
[]
no_license
TuckerL-OSU/CS162
6338d34e10ae39f78cce7cb1aac94e72c2a589b9
cab3d74fd643bf51accf65bdc9b2739a20c28c8f
refs/heads/master
2020-09-05T09:08:16.289795
2019-11-06T17:23:47
2019-11-06T17:23:47
218,779,912
0
0
null
null
null
null
UTF-8
C++
false
false
3,094
cpp
Board.cpp
/****************************************************************************** * Tucker Lavell * CS162 Fall 2017 * Final Project * Board.cpp ******************************************************************************/ #include "Board.hpp" //Board::Board() { // for (int i = 0; i < ROWS; i++) { // for (int j = 0; j < COLS; j++) { // gameBoard[i][j] = UNVISITED; // } // } // // setHome(); // setRocket(); //} // http://www.geeksforgeeks.org/flatten-a-linked-list-with-next-and-child-pointers/ // possibly not the only one I used, but this was the first thing that I found // which pointed me in the right direction Board::Board(const int rows, const int cols) { head = nullptr; Space *current = nullptr; Space *currentHead = nullptr; Space *prev = nullptr; for (int i = 0; i < ROWS; i++) { for (int j = 0; j < COLS; j++) { // maybe mem leak if (i == 0 && j == 0) { Space *room = new EmptyRoom(); head = room; current = head; } if (i == 0 && j > 0) { Space *room = new EmptyRoom(); room->setWest(current); current->setEast(room); head->setEast(current); if (j == COLS - 1) { current = head; } } if (i > 0 && j == 0) { Space *room = new EmptyRoom(); prev = current; room->setNorth(prev); prev->setSouth(room); current = room; currentHead = room; prev->setEast(prev->getEast()); } if (i > 0 && j > 0) { Space *room = new EmptyRoom(); room->setWest(current); current->setEast(room); current->setNorth(prev); if (j == COLS - 1) { prev = currentHead->getNorth(); } } if (i == ROWS - 1 && j == 0) { Space *room = new EmptyRoom(); prev = current; room->setNorth(prev); prev->setSouth } } } setHome(); setRocket(); } Board::~Board() { } void Board::addSpace() { } void Board::setHome() { gameBoard[ROWS / 2][COLS / 2] = CLEFAIRY; location = new HomeRoom(ROWS / 2, COLS / 2); } void Board::setRocket() { int rocketRow = RNG(0, ROWS - 1); int rocketCol = RNG(0, COLS - 1); if (gameBoard[rocketRow][rocketCol] == CLEFAIRY) { setRocket(); } else { gameBoard[rocketRow][rocketCol] = ROCKET; } } int Board::move(int row, int col, Direction direction) { // out of bounds move if ((row > ROWS - 1 && row < 0) || (col > COLS - 1 && col < 0)) { return 1; } // good move else if (gameBoard[row][col] == UNVISITED) { gameBoard[row][col] = CURRENT; return 2; } // return to a previous room else { gameBoard[row][col] = (SpaceState)direction; switch (direction) { case NORTH: gameBoard[row + 1][col] = CURRENT; break; case SOUTH: gameBoard[row - 1][col] = CURRENT; break; case EAST: gameBoard[row][col + 1] = CURRENT; break; case WEST: gameBoard[row][col - 1] = CURRENT; break; default: break; } return 3; } } void Board::printBoard() { for (int i = 0; i < ROWS; i++) { cout << "|---+---+---+---+---|" << endl; cout << "| "; for (int j = 0; j < COLS; j++) { cout << (char)gameBoard[i][j] << " | "; } cout << endl; } cout << "|---+---+---+---+---|" << endl; }
2eb9565b009e14840875f218e3fa7479f1752a86
5161c240c9ced1ee98a7fb9bfddeca0bf9af1757
/src/Core/Input/InputManager.hpp
b869fe5bf4b2f1d514d67715a8288db6dab3fcea
[]
no_license
TheGuyMatt/Architect
fc1e39fc7ebefd3c4e60fc7d24308036e4533861
49adce9212a6c8066b3978b89e8ddbb5860ad1e5
refs/heads/master
2023-01-02T02:42:02.758204
2020-10-26T19:00:13
2020-10-26T19:00:13
254,546,874
1
0
null
null
null
null
UTF-8
C++
false
false
473
hpp
InputManager.hpp
#ifndef INPUTMANAGER_HPP #define INPUTMANAGER_HPP #include <SDL.h> #include <bitset> #include "InputButtons.hpp" #include "../Coordinator.hpp" #include "../Window.hpp" class InputManager { public: InputManager() {} ~InputManager() {} void Init(Coordinator *coordinator); void Update(); private: Coordinator *_coordinator; SDL_Event evnt; std::bitset<8> _buttons; bool _buttonStateChanged = true; void buttonEvent(); }; #endif
51437a6cd0bc066630ed4719e3706672fb81f9c0
c9c6ea21b7c758ab63b45ebd85f83b7dbdf00dd8
/C++/Asteroids_Game/PhilipEklund_Projekt/Player.h
03d07a5a8297053ca912471c130f90c6f27bc4e3
[]
no_license
Phil-hub/PhilipEklund_Projects
bd39afd97979d70b69d785ceee457868bf600353
44a6f5e2482ca5b791a7164d53c8d632fb5694ed
refs/heads/main
2023-03-02T08:01:09.204222
2021-02-01T11:26:02
2021-02-01T11:26:02
334,924,239
0
0
null
null
null
null
UTF-8
C++
false
false
1,872
h
Player.h
#ifndef PLAYER_H #define PLAYER_H /* * By: Philip Eklund * Course: DT047G * Date 15 JAN 2021 * PROJECT: ASTEROIDS GAME */ #include "Entity.h" #include "Engine.h" /*! * * \brief Player class derived from Entity using Engine to load texture file. * \details This is the player handling movement inputs and animation state. * \author Philip EKlund * \version 1.0 * \date 2021 * \pre Uses the file "Textures/ship.png", start position set at default to 300 ,320 * \copyright GNU Public License. Free to do whatever you want. */ class Player : public Entity, Engine { public: /** * Default constructor for player, * Default position: sf::Vector2f(300.f,320.f)) * Default texture rectangle: rect(53, 0, 53, 43) */ Player(); //Init the player /** * Default destructor */ ~Player(); //Init the player /** * MoveUp * @param TF, True/false set if we are trying to move up. */ void MoveUp(bool TF); //Key pressed? /** * MoveLeft * @param TF, True/false set if we are trying to move Left. */ void MoveLeft(bool TF); //Key pressed? /** * MoveRight * @param TF, True/false set if we are trying to move Right. */ void MoveRight(bool TF); //Key pressed? /** *MoveDown * @param TF, True / false set if we are trying to move Down. */ void MoveDown(bool TF); //Key pressed? /** * MovePlayer * @param deltaTime sf::Time since last time we moved the player. * Calculate movement depending on movement bools */ void MovePlayer(sf::Time deltaTime); //Get and Apply movement vector private: sf::IntRect rect; //SPRITE texture rectangle bool leftAnim = false; //ANIMATION bool rightAnim = false; //ANIMATION bool mIsMovingUp = false; //MOVEMENT bool mIsMovingDown = false; //MOVEMENT bool mIsMovingLeft = false; //MOVEMENT bool mIsMovingRight = false; //MOVEMENT }; /*! *\example Example_Player.cpp */ #endif
143e4815d82599198a3fc057ab1675ef31c2ec78
5eaaed4f10d181ba4a1b3c20f977b28d15e52d7d
/Source/RAYTRVW.CPP
b5ce0721acea49a32ce7f5b92e79270f76b6853f
[ "Apache-2.0" ]
permissive
pmamut/RayTrace
6b019b4fb329cc927f4b03833b77e40994df2cfc
53def7c51e227897fcf2b67c76154d29453527da
refs/heads/master
2016-09-06T19:48:31.914129
2013-08-12T05:15:29
2013-08-12T05:15:29
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,980
cpp
RAYTRVW.CPP
// raytrvw.cpp : implementation of the CRaytraceView class // #include "stdafx.h" #include "raytrace.h" #include "mainfrm.h" #include "raytrdoc.h" #include "raytrvw.h" #include "stdio.h" #include "string.h" #include "math.h" #ifdef _DEBUG #undef THIS_FILE static char BASED_CODE THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CRaytraceView IMPLEMENT_DYNCREATE(CRaytraceView, CScrollView) BEGIN_MESSAGE_MAP(CRaytraceView, CScrollView) //{{AFX_MSG_MAP(CRaytraceView) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CRaytraceView construction/destruction CRaytraceView::CRaytraceView() { } CRaytraceView::~CRaytraceView() { } ///////////////////////////////////////////////////////////////////////////// // CRaytraceView drawing void CRaytraceView::OnDraw(CDC* pDC) { CRaytraceDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); CMainFrame* main = (CMainFrame*) AfxGetMainWnd (); if (main->bImageReady) main->model.screen.image.Paint (pDC->GetSafeHdc ()); } void CRaytraceView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); CSize sizeTotal; // TODO: calculate the total size of this view sizeTotal.cx = sizeTotal.cy = 0; SetScrollSizes(MM_TEXT, sizeTotal); } ///////////////////////////////////////////////////////////////////////////// // CRaytraceView diagnostics #ifdef _DEBUG void CRaytraceView::AssertValid() const { CScrollView::AssertValid(); } void CRaytraceView::Dump(CDumpContext& dc) const { CScrollView::Dump(dc); } CRaytraceDoc* CRaytraceView::GetDocument() // non-debug version is inline { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CRaytraceDoc))); return (CRaytraceDoc*)m_pDocument; } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CRaytraceView message handlers
7dad0a9cc1e14579f3971e4b54905106f5769794
7dd68d99c459400fb38373418774990ffbe33508
/uiManager.h
b10201a95f5e81cb4cd2bc5c209281c24d6c0260
[ "MIT" ]
permissive
xyxdasnjss/ZombieKiller-Windows
1d577c6788b9423f7a935f72f90818a2f76a0c48
4b8da646c54632a4ad5b98a6910a5e9b6670ffd9
refs/heads/master
2021-01-17T23:14:19.588233
2014-05-04T21:09:58
2014-05-04T21:09:58
null
0
0
null
null
null
null
UTF-8
C++
false
false
370
h
uiManager.h
#pragma once class uiManager { public: uiManager(void); ~uiManager(void); void drawInterface(GWindow* Gwin, player* guy, std::string weaponName, std::string weaponInfo, gameTime* gameTimer, attack* currentAttack); private: GImage heart[2]; GImage weaponActive[3]; GImage weaponInactive[3]; GImage uiBackground; //Heart Animation double scale; int loop; };
9496ca5e8a256bc9b5f47c0897fe3e9461a73256
b149e742420bfb9ae67ae040d2190d44bd141b81
/solutions/2. Add Two Numbers.cpp
acf445e3a273d7248893614266a092052e4b48b5
[]
no_license
jacksondearing96/leetcode
7a052e78d2eac82888a3b3b8fb70905bcc8ab253
c16c76ab2c7bf403beedf6ead719326be0141308
refs/heads/main
2023-06-22T08:58:16.774982
2021-07-22T13:10:29
2021-07-22T13:10:29
304,802,945
1
0
null
null
null
null
UTF-8
C++
false
false
1,231
cpp
2. Add Two Numbers.cpp
/** * Definition for singly-linked list. * struct ListNode { *     int sum; *     ListNode *next; *     ListNode() : sum(0), next(nullptr) {} *     ListNode(int x) : sum(x), next(nullptr) {} *     ListNode(int x, ListNode *next) : sum(x), next(next) {} * }; */ class Solution { public:        static constexpr int BASE = 10;        ListNode* addTwoNumbersHelper(ListNode* l1, ListNode* l2, int carry = 0) {        if (l1 == nullptr && l2 == nullptr) {            if (carry == 0) return nullptr;            return new ListNode(1);       }                int sum = 0;        if (l1 != nullptr) sum += l1->val;        if (l2 != nullptr) sum += l2->val;        sum += carry;              ListNode* node = new ListNode(sum % BASE);        node->next = addTwoNumbersHelper((l1 == nullptr) ? nullptr : l1->next,                                         (l2 == nullptr) ? nullptr : l2->next,                                         sum / BASE);        return node;   }        ListNode* addTwoNumbers(ListNode* l1, ListNode* l2) {        return addTwoNumbersHelper(l1, l2);   } };
3a9141be413818d7f6adc880d037debd3883ba53
604bd2c5d0f74cd9db4f36a574ae0071a4aecf99
/src/cli/ui/VoNameCli.h
b753077545ce3b555179dcaf6526250a8d38fd2c
[ "Apache-2.0" ]
permissive
cern-fts/fts3
9030359d79c0e2aa49ff48c2ef8e75dc555bf7ca
775908e6b52a9ae000b2e7524b66dbd173a83162
refs/heads/master
2023-08-17T11:35:44.150225
2023-08-14T13:42:21
2023-08-14T13:43:05
138,748,767
16
7
null
null
null
null
UTF-8
C++
false
false
2,438
h
VoNameCli.h
/* * Copyright (c) CERN 2013-2015 * * Copyright (c) Members of the EMI Collaboration. 2010-2013 * See http://www.eu-emi.eu/partners for details on the copyright * holders. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef LISTVOMANAGER_H_ #define LISTVOMANAGER_H_ #include "CliBase.h" #include <string> namespace fts3 { namespace cli { /** * The command line utility for specyfying VO name * * The class provides: * - voname, which is a positional parameter if the constructor * parameter was true, otherwise its an ordinary parameter * (o option is also available in that case), allows for * specifying the VO name */ class VoNameCli: virtual public CliBase { public: /** * Default Constructor. * * @param pos - if true VONAME is market as both: hidden and positional, otherwise it is a tool specific option * */ VoNameCli(bool pos = true); /** * Destructor. */ virtual ~VoNameCli(); /** * Validates command line options * 1. Checks the endpoint * 2. If -h or -V option were used respective informations are printed * 3. GSoapContexAdapter is created, and info about server requested * 4. Additional check regarding server are performed * 5. If verbal additional info is printed * * @return GSoapContexAdapter instance, or null if all activities * requested using program options have been done. */ virtual void validate(); /** * Gives the instruction how to use the command line tool. * * @return a string with instruction on how to use the tool */ std::string getUsageString(std::string tool) const; /** * Gets the VO name. * * @return VO name if it was specified, empty string otherwise */ std::string getVoName(); private: bool pos; }; } } #endif /* LISTVOMANAGER_H_ */
441f3f9ed648691a2c0016c767cc1e103da84218
93e2b74079ebf86f47e614596eb0233e0f16d924
/AzureIoTHubClient/Ldr.h
be71596f72871ff66221601d295af80c31e4e8fc
[]
no_license
gloveboxes/Arduino-ESP8266-Secure-Mqtt-Azure-IoT-Hub-Client
127afc273e9cb2115733fc8f3cbadae632461593
398d2f88b65c06574350912e930ea6609adf9753
refs/heads/master
2021-01-12T00:19:23.965595
2020-12-13T23:45:32
2020-12-13T23:45:32
78,704,221
9
3
null
2020-12-13T23:45:43
2017-01-12T03:20:29
C++
UTF-8
C++
false
false
135
h
Ldr.h
#ifndef LDR_h #define LDR_h class Ldr { public: Ldr(int pin = A0) { _pin = pin; } int measure(); private: int _pin; }; #endif
2e829ab1e91b8c613066dbc87d4fc0d209ac8989
f9bda72cae8045ffcb7c6f45a0f2c419430c4fe2
/worker/cppworker/config/SimpleConfig.h
71fd151fdd758d53f44a4a509c8ce286c95daee6
[ "Apache-2.0" ]
permissive
paypal/hera
eec28fe9bfa73865df17608e1bd5ae8707e9db6a
af6bc1d04dfc16241f851ef25ca925df1cd839a8
refs/heads/main
2023-09-04T03:12:27.165889
2023-08-31T18:49:30
2023-08-31T18:49:30
184,614,293
284
119
Apache-2.0
2023-09-14T19:12:32
2019-05-02T16:24:38
Go
UTF-8
C++
false
false
1,676
h
SimpleConfig.h
// Copyright 2020 PayPal Inc. // // Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache License, Version 2.0 // (the "License"); you may not use this file except in compliance with // the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef _SIMPLECONFIG_H_ #define _SIMPLECONFIG_H_ /* Fast hash-based config class Config format: [lwsp]name[lwsp]=[lwsp]value[lwsp][n] lwsp = linear white space n = newline Lines starting with # are comments */ #include <string> #include <unordered_map> #include "Config.h" //redefine this if you think your config file will be larger #ifndef SIMPLE_CONFIG_INITIAL_SIZE #define SIMPLE_CONFIG_INITIAL_SIZE 200 #endif // SimpleConfigIterator class unused and removed for PPSCR00111530 class SimpleConfig : public Config { public: SimpleConfig(const std::string& filename); ~SimpleConfig(); virtual bool get_value(const std::string& name, std::string& value) const; bool get_all_values (std::unordered_map<std::string,std::string>& _values_out) const; private: std::unordered_map<std::string,std::string> values; }; #endif
9e9f1383506bac5a37eff33d2e614ade698621aa
536b21ab1ebacc907a2435c667756240f48a0cb2
/C&C++ Project File/OnlineJudge/OnlineJudge/BAEKJOON/Step by Step/[6] Array/[2] NumberOfNumbers.cpp
c130360b166b587b2046cbb0bb7dc4f4abc5752a
[]
no_license
IRONAGE-Park/online-judge
e3d9f37cc93182b81a16912efae912fe46a7cc9e
724a7a301ecd6226fe78b916662c44b88866d9c0
refs/heads/master
2022-03-09T22:19:18.947225
2019-01-20T19:05:17
2019-01-20T19:05:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
438
cpp
[2] NumberOfNumbers.cpp
#include<iostream> #include<vector> #include<string> #define NUM 10 using namespace std; template <typename Iter> void Print(Iter begin, Iter end) { for (; begin != end; begin++) { cout << *begin << endl; } } int main() { int A, B, C; cin >> A >> B >> C; string num(to_string(A * B * C)); vector<int> v(NUM, 0); for (int i = 0; i < num.length(); i++) { v.at(num.at(i) - 48)++; } Print(v.begin(), v.end()); return 0; }
6e6af5355ad7b3b15fe42e0e8e48125d0a4e1d66
31182f668eed4c4ca40b1de445591747c584a9e3
/externals/browser/externals/browser/externals/libhttp/http/test/clienttest/main.cpp
68e622e2120cc558caa27e7b33bc73be3b253240
[ "BSD-2-Clause" ]
permissive
HanochZhu/vts-browser-unity-plugin
62666b98da055a06458b00efcbe43fb7ef7e4e14
32a22d41e21b95fb015326f95e401d87756d0374
refs/heads/main
2023-07-24T22:33:39.358166
2021-09-10T04:03:57
2021-09-10T04:03:57
402,318,471
1
0
null
null
null
null
UTF-8
C++
false
false
5,047
cpp
main.cpp
#include <vector> #include <fstream> #include <functional> #include <unistd.h> // usleep #include <boost/optional.hpp> #include <boost/filesystem/path.hpp> #include "dbglog/dbglog.hpp" #include "utility/buildsys.hpp" #include "utility/gccversion.hpp" #include "service/cmdline.hpp" #include "http/http.hpp" #include "http/resourcefetcher.hpp" namespace po = boost::program_options; namespace fs = boost::filesystem; std::atomic<int> active; std::atomic<int> succeded; std::atomic<int> finished; std::atomic<int> started; class Task { public: Task(const std::string &url) : query(url) { active++; started++; query.timeout(5000); } ~Task() { active--; } void done(http::ResourceFetcher::MultiQuery &&queries) { finished++; http::ResourceFetcher::Query &q = *queries.begin(); if (q.exc()) { try { std::rethrow_exception(q.exc()); } catch(std::exception &e) { LOG(err3) << "exception: " << e.what(); } catch(...) { LOG(err3) << "unknown exception"; } } else if (q.valid()) { succeded++; const http::ResourceFetcher::Query::Body &body = q.get(); LOG(info3) << "Downloaded: '" << q.location() << "', size: " << body.data.length(); } else LOG(err3) << "Failed: " << q.location() << ", http code: " << q.ec().value(); } http::ResourceFetcher::Query query; }; class Test : public service::Cmdline { public: Test() : service::Cmdline("http-clienttest", BUILD_TARGET_VERSION) , targetDownloads_(100) , threadCount_(2) {} private: virtual void configuration(po::options_description &cmdline , po::options_description &config , po::positional_options_description &pd) UTILITY_OVERRIDE; virtual void configure(const po::variables_map &vars) UTILITY_OVERRIDE; virtual bool help(std::ostream &out, const std::string &what) const UTILITY_OVERRIDE { if (what.empty()) { out << R"RAW(http-clienttest usage http-clienttest [target-downloads-count [urls-file-path]] [OPTIONS] )RAW"; } return false; } virtual int run() UTILITY_OVERRIDE; std::size_t targetDownloads_; boost::optional<fs::path> urls_; std::size_t threadCount_; }; void Test::configuration(po::options_description &cmdline , po::options_description& , po::positional_options_description &pd) { cmdline.add_options() ("count", po::value(&targetDownloads_) ->required()->default_value(targetDownloads_) , "Number of donwloads to perform.") ("urls", po::value<fs::path>() , "Path to URL file") ("threadCount", po::value(&threadCount_) ->default_value(threadCount_)->required() , "Number of HTTP threads (and CURL clients).") ; pd.add("count", 1).add("urls", 1); } void Test::configure(const po::variables_map &vars) { if (vars.count("urls")) { urls_ = vars["urls"].as<fs::path>(); } } int Test::run() { std::vector<std::string> urls({ "https://www.melown.com/", "https://www.melown.com/tutorials.html", "https://www.melown.com/blog.html", }); if (urls_) { LOG(info4) << "Loading urls from file."; std::string line; std::ifstream f(urls_->string()); if (f.is_open()) { urls.clear(); while (std::getline(f,line)) { if (!line.empty()) { urls.push_back(line); } } f.close(); } else { LOG(warn4) << "Failed to open specified file."; } } LOG(info4) << "Will download from " << urls.size() << " urls."; http::Http htt; http::ResourceFetcher fetcher(htt.fetcher()); { http::ContentFetcher::Options options; options.maxTotalConections = 10; options.pipelining = 2; htt.startClient(threadCount_, &options); } for (unsigned long i = 0; i < targetDownloads_; i++) { while (active > 25) usleep(1000); auto t = std::make_shared<Task>(urls[rand() % urls.size()]); fetcher.perform(t->query, std::bind(&Task::done, t, std::placeholders::_1)); } LOG(info3) << "Waiting for threads to stop."; htt.stop(); LOG(info4) << "Client stopped" << ", downloads started: " << started << ", finished: " << finished << ", succeded: " << succeded << "."; return EXIT_SUCCESS; } int main(int argc, char *argv[]) { return Test()(argc, argv); }
734c98bfbcb038a24bfc47afb8824d03a3d533ba
ccf15e50e9d8fa2a10a7057a137eaaa6f41f8089
/batallanaval1/src/Bote.cpp
3b9d00d805b20c46023d003ce62390adbfabbaec
[]
no_license
alexa1999/juego1
16f24fba0802517a3f540608cc8c784cbc9e614f
8f3cf225b73854d428f76e8b305db8650336a6fc
refs/heads/master
2020-12-02T18:15:14.034473
2017-07-07T05:54:43
2017-07-07T05:54:43
96,503,773
0
0
null
null
null
null
UTF-8
C++
false
false
92
cpp
Bote.cpp
#include "Bote.h" /* Bote::Bote() { //ctor } Bote::~Bote() { //dtor }*/
152064d4a16481886ebea32ecc4017c68b7324cb
0e3f7190f3fc6e814a06544f30aa19df6ba25e5f
/stdlib/caffe/openpose_kernel.cpp
23a45b95b47247058e456d91d1788e4c113ec446
[ "Apache-2.0" ]
permissive
photoszzt/scanner
ba172219365f563f129acf64867618881323b727
712796dffed7411791499b9226a57410b4ce216c
refs/heads/master
2020-05-21T12:01:48.505802
2019-05-14T20:14:25
2019-05-14T20:14:25
186,045,462
0
0
Apache-2.0
2019-05-10T19:44:44
2019-05-10T19:44:44
null
UTF-8
C++
false
false
5,559
cpp
openpose_kernel.cpp
#include <iostream> #include <opencv2/core/cuda.hpp> #include <openpose/headers.hpp> #include "scanner/api/kernel.h" #include "scanner/api/op.h" #include "scanner/util/cuda.h" #include "scanner/util/opencv.h" #include "stdlib/stdlib.pb.h" namespace scanner { const int POSE_KEYPOINTS = 18; const int FACE_KEYPOINTS = 70; const int HAND_KEYPOINTS = 21; const int TOTAL_KEYPOINTS = POSE_KEYPOINTS + FACE_KEYPOINTS + 2 * HAND_KEYPOINTS; class OpenPoseKernel : public scanner::BatchedKernel, public scanner::VideoKernel { public: OpenPoseKernel(const scanner::KernelConfig& config) : scanner::BatchedKernel(config), opWrapper_{op::ThreadManagerMode::Asynchronous}, device_(config.devices[0]) { proto::OpenPoseArgs args; args.ParseFromArray(config.args.data(), config.args.size()); const op::WrapperStructPose wrapperStructPose{true, {-1, 368}, {-1, -1}, op::ScaleMode::ZeroToOne, 1, device_.id, args.pose_num_scales(), args.pose_scale_gap(), op::RenderMode::None, op::PoseModel::COCO_18, false, 0.6, 0.7, 0, args.model_directory(), {op::HeatMapType::Parts}, op::ScaleMode::ZeroToOne, 0.05, false}; const op::WrapperStructFace wrapperStructFace{ true, {368, 368}, op::RenderMode::None, 0.6, 0.7, 0.2}; const op::WrapperStructHand wrapperStructHand{true, {368, 368}, args.hand_num_scales(), args.hand_scale_gap(), false, op::RenderMode::None, 0.6, 0.7, 0.2}; opWrapper_.configure(wrapperStructPose, wrapperStructFace, wrapperStructHand, op::WrapperStructInput{}, op::WrapperStructOutput{}); opWrapper_.start(); } void execute(const scanner::BatchedColumns& input_columns, scanner::BatchedColumns& output_columns) override { auto& frame_col = input_columns[0]; auto datumsPtr = std::make_shared<std::vector<op::Datum>>(); for (int i = 0; i < num_rows(frame_col); ++i) { datumsPtr->emplace_back(); auto& datum = datumsPtr->at(datumsPtr->size() - 1); CUDA_PROTECT({ cv::cuda::GpuMat gpu_input = scanner::frame_to_gpu_mat(frame_col[i].as_const_frame()); datum.cvInputData = cv::Mat(gpu_input); }); } bool emplaced = opWrapper_.waitAndEmplace(datumsPtr); LOG_IF(FATAL, !emplaced) << "Failed to emplace pose work"; std::shared_ptr<std::vector<op::Datum>> datumProcessed; bool popped = opWrapper_.waitAndPop(datumProcessed); LOG_IF(FATAL, !popped) << "Failed to pop pose results"; for (auto& datum : *datumProcessed) { int num_people = datum.poseKeypoints.getSize(0); size_t size = num_people > 0 ? TOTAL_KEYPOINTS * num_people * 3 * sizeof(float) : 1; float* kp = new float[size / sizeof(float)]; float* curr_kp = kp; for (int i = 0; i < num_people; ++i) { std::memcpy(curr_kp, datum.poseKeypoints.getPtr() + i * POSE_KEYPOINTS * 3, POSE_KEYPOINTS * 3 * sizeof(float)); curr_kp += POSE_KEYPOINTS * 3; std::memcpy(curr_kp, datum.faceKeypoints.getPtr() + i * FACE_KEYPOINTS * 3, FACE_KEYPOINTS * 3 * sizeof(float)); curr_kp += FACE_KEYPOINTS * 3; std::memcpy(curr_kp, datum.handKeypoints[0].getPtr() + i * HAND_KEYPOINTS * 3, HAND_KEYPOINTS * 3 * sizeof(float)); curr_kp += HAND_KEYPOINTS * 3; std::memcpy(curr_kp, datum.handKeypoints[1].getPtr() + i * HAND_KEYPOINTS * 3, HAND_KEYPOINTS * 3 * sizeof(float)); curr_kp += HAND_KEYPOINTS * 3; } float* gpu_kp = (float*)scanner::new_buffer(device_, size); scanner::memcpy_buffer((scanner::u8*)gpu_kp, device_, (scanner::u8*)kp, scanner::CPU_DEVICE, size); scanner::insert_element(output_columns[0], (scanner::u8*)gpu_kp, size); delete kp; } } private: scanner::DeviceHandle device_; op::Wrapper<std::vector<op::Datum>> opWrapper_; }; REGISTER_OP(OpenPose).frame_input("frame").output("pose"); REGISTER_KERNEL(OpenPose, OpenPoseKernel) .device(scanner::DeviceType::GPU) .num_devices(1) .batch(); } // namespace scanner
e42b2eb355b9535c20c2f4989f65add9dff420aa
73ac81a6ed8a1a68ab0e6ac475d3ee477f11cf48
/chockngt3/i4k_OGL/src/mathhelpers.cpp
85c7372edf959946620f156e2defcd78292a24e4
[ "BSD-3-Clause" ]
permissive
chock-mostlyharmless/mostlyharmless
8f3dea163ec7133a43ca7b2965fee69314f8ad53
b9952614c666e4ad315968318ba03715c8bfb763
refs/heads/master
2021-11-19T04:21:18.200290
2021-08-06T15:30:46
2021-08-06T15:30:46
41,435,897
0
0
null
null
null
null
UTF-8
C++
false
false
5,281
cpp
mathhelpers.cpp
#include "stdafx.h" #include "mathhelpers.h" float frand() { return (float)rand()/(float)RAND_MAX; } void normalize(float *vector, int dimension) { float length = 0.0f; for (int i = 0; i < dimension; i++) { length += vector[i] * vector[i]; } length = sqrtf(length); if (length > 0.0001f) { for (int i = 0; i < dimension; i++) { vector[i] = vector[i] / length; } } else { vector[0] = 1.0f; for (int i = 1; i < dimension; i++) { vector[i] = 0.0f; } } } // dot product float dot(float *a, float *b, int dimension) { float result = 0.0f; for (int i = 0; i < dimension; i++) { result += a[i] * b[i]; } return result; } // change vector so that it is normal again. // Both must be normalized. // TODO: will fail, if they go the same way. void reNormal(float *vec, float *normal, int dimension) { float normalizer = dot(vec, normal, dimension); for (int i = 0; i < dimension; i++) { vec[i] -= normalizer * normal[i]; } normalize(vec, dimension); } // only for unit length vectors! // source and result may be the same. void slerp(float *source, float *dest, float *result, int dimension, float t) { // fake! for (int i = 0; i < dimension; i++) { result[i] = (1.0f - t) * source[i] + t * dest[i]; } normalize(result, dimension); } //f(x) = x^4/2 - x^2 + 1/2 static float polynomial(float t) { t = t*t; return t*t*0.5f - t + 0.5f; // adjustment for polynomial summation error //t = t * 0.939f; // summation error is normalized explicitly } // polygonal interpolation using 4 Stuetzstellen. // TODO: This should be done properly with some sort of spline. // Derivation of the interpolator has 0 at -1, 0, 1 // ==> f'(x) ~ (x-1)(x+1)x = (x^2-1)x = x^3 - x // ==> f(x) ~ x^4/4 - x^2/2 - b // f(-1) = 0, f(1) = 0 => 1/4 - 1/2 - b = 0 // Scaled result: f(x) = x^4/2 - x^2 + 1/2 // This thing is going to explode if far away for 0. void interpolation(float *source1, float *source2, float *source3, float *source4, float *result, int dimension, float t) { float p1 = polynomial(0.5f * t + 0.5f); float p2 = polynomial(0.5f * t); float p3 = polynomial(0.5f * t - 0.5f); float p4 = polynomial(0.5f * t - 1.0f); float P = p1 + p2 + p3 + p4; P = 1.0f / P; // reset to 0 for (int i = 0; i < dimension; i++) { result[i] = 0.0f; } // influence of leftmost part for (int i = 0; i < dimension; i++) { result[i] += source1[i] * p1 * P; } // influence of left part for (int i = 0; i < dimension; i++) { result[i] += source2[i] * p2 * P; } // influence of right part for (int i = 0; i < dimension; i++) { result[i] += source3[i] * p3 * P; } // influence of rightmost part for (int i = 0; i < dimension; i++) { result[i] += source4[i] * p4 * P; } } void Matrix::lookAt(float eyeX, float eyeY, float eyeZ, float centerX, float centerY, float centerZ, float upX, float upY, float upZ) { // TODO: I might need the transpose of this, I do not know. // Calculate the delta location (that goes into Z?) // And yes, opengl is so crazy to want a minus there (negative z) data[2][0] = -(centerX - eyeX); data[2][1] = -(centerY - eyeY); data[2][2] = -(centerZ - eyeZ); // normalize float lenFront = sqrtf(data[2][0]*data[2][0] + data[2][1]*data[2][1] + data[2][2]*data[2][2]); float invLenFront = 1.0f/lenFront; data[2][0] *= invLenFront; data[2][1] *= invLenFront; data[2][2] *= invLenFront; // Remove the lookat direction to get it normal: float scalarProduct = upX * data[2][0] + upY * data[2][1] + upZ * data[2][2]; float lenUp = sqrtf(upX*upX + upY*upY + upZ*upZ); scalarProduct /= lenUp; data[1][0] = upX - data[2][0] * scalarProduct; data[1][1] = upY - data[2][1] * scalarProduct; data[1][2] = upZ - data[2][2] * scalarProduct; // normalize up lenUp = sqrtf(data[1][0]*data[1][0] + data[1][1]*data[1][1] + data[1][2]*data[1][2]); float invLenUp = 1.0f/lenUp; data[1][0] *= invLenUp; data[1][1] *= invLenUp; data[1][2] *= invLenUp; // The right vector is the cross product of up and front // This will already be normalized... data[0][0] = data[1][1]*data[2][2] - data[1][2]*data[2][1]; data[0][1] = data[1][2]*data[2][0] - data[1][0]*data[2][2]; data[0][2] = data[1][0]*data[2][1] - data[1][1]*data[2][0]; // To get the real movement vector, I need to transform it first // potentially with the transpose of the rotation??? ARGH! data[0][3] = -(data[0][0]*eyeX + data[0][1]*eyeY + data[0][2]*eyeZ); data[1][3] = -(data[1][0]*eyeX + data[1][1]*eyeY + data[1][2]*eyeZ); data[2][3] = -(data[2][0]*eyeX + data[2][1]*eyeY + data[2][2]*eyeZ); // The bottom vector? I do not care? data[3][0] = 0.0f; data[3][1] = 0.0f; data[3][2] = 0.0f; data[3][3] = 1.0f; } void Matrix::transform(float input[3], float output[3]) { for (int dim = 0; dim < 3; dim++) { output[dim] = data[dim][3]; for (int i = 0; i < 3; i++) { output[dim] += data[dim][i] * input[i]; } } } void Matrix::vertex3f(float x, float y, float z) { float input[3] = {x, y, z}; float output[3]; transform(input, output); glVertex3fv(output); }
e287ec4ecd814780adc24287bc3fc2134c259c6d
ece2011fdb20670f76b6b970df54bc818c6b313b
/Sources/Engine/Log.hpp
a393ec27e98e6d3bdbb01d6dbce4c8e725ceb8ba
[ "MIT" ]
permissive
FirstLoveLife/Acid
eda32711a0cfdcc9f596e547e2880e9edfffda5a
b7ce821a6a2b2d4bc441b724fabe1bbd9b9c6b8d
refs/heads/master
2020-04-28T04:20:02.863648
2019-03-15T19:26:27
2019-03-15T19:26:27
174,974,067
0
0
null
2019-03-11T10:09:23
2019-03-11T10:09:22
null
UTF-8
C++
false
false
2,264
hpp
Log.hpp
#pragma once #include <mutex> #include "StdAfx.hpp" namespace acid { /// <summary> /// A logging class used in Acid, will write output to a file one the application has closed. /// </summary> class ACID_EXPORT Log { public: /// <summary> /// Outputs a message into the console. /// </summary> /// <param name="string"> The string to output. </param> static void Out(const std::string &string); /// <summary> /// Outputs a message into the console. /// </summary> /// <param name="format"> The format to output into. </param> /// <param name="args"> The args to be added into the format. </param> template<typename... Args> static void Out(const std::string &format, Args &&... args) { Out(StringFormat(format, std::forward<Args>(args)...)); } /// <summary> /// Outputs a error into the console. /// </summary> /// <param name="string"> The string to output. </param> static void Error(const std::string &string); /// <summary> /// Outputs a error into the console. /// </summary> /// <param name="format"> The format to output into. </param> /// <param name="args"> The args to be added into the format. </param> template<typename... Args> static void Error(const std::string &format, Args &&... args) { Error(StringFormat(format, std::forward<Args>(args)...)); } /// <summary> /// Displays a popup menu. /// </summary> /// <param name="title"> The title. </param> /// <param name="message"> The message. </param> static void Popup(const std::string &title, const std::string &message); /// <summary> /// Sets a file to output all log messages into. /// </summary> /// <param name="filename"> The filename to output into. </param> static void OpenLog(const std::string &filename); private: static ACID_STATE std::mutex MUTEX; static ACID_STATE std::ofstream STREAM; template<typename... Args> static std::string StringFormat(const std::string &format, Args &&... args) { size_t size = snprintf(nullptr, 0, format.c_str(), args ...) + 1; // Extra space for '\0' std::unique_ptr<char[]> buf(new char[size]); snprintf(buf.get(), size, format.c_str(), args ...); return std::string(buf.get(), buf.get() + size - 1); // Excludes the '\0' } }; }
7cb97f4ab7c5ecb49b339a79bea03951d5e868c8
5386865e2ea964397b8127aba4b2592d939cd9f2
/grupa B/olimpiada/oblasten/2012/bus2.cpp
173346fbbae1648332a0f2be43ef7396e8d095b0
[]
no_license
HekpoMaH/Olimpiads
e380538b3de39ada60b3572451ae53e6edbde1be
d358333e606e60ea83e0f4b47b61f649bd27890b
refs/heads/master
2021-07-07T14:51:03.193642
2017-10-04T16:38:11
2017-10-04T16:38:11
105,790,126
2
0
null
null
null
null
UTF-8
C++
false
false
1,524
cpp
bus2.cpp
#include<bits/stdc++.h> using namespace std; unsigned to[32768],stopid[1000001]; vector<unsigned> stops; vector<pair<unsigned,unsigned> >dist[32768]; unsigned input[32768][3]; unsigned n,a,b,i,j,bstop,astop; priority_queue<pair<unsigned,unsigned>, vector<pair<unsigned,unsigned> >,greater<pair<unsigned,unsigned> > >cards; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin>>n>>a>>b; a--;b--; for(i=0;i<n;i++) { cin>>input[i][0]>>input[i][1]>>input[i][2]; input[i][0]--;input[i][1]--; stops.push_back(input[i][0]); stops.push_back(input[i][1]); } stops.push_back(a);stops.push_back(b); sort(stops.begin(),stops.end()); stops.erase(unique(stops.begin(),stops.end()),stops.end()); for(i=0;i<stops.size();i++)stopid[stops[i]]=i; astop=stopid[a]; bstop=stopid[b]; for(i=0;i<n;i++) dist[stopid[input[i][0]]].push_back(make_pair(stopid[input[i][1]],input[i][2])); for(i=0;i<=astop;i++) { to[i]=0; for(int j=0;j<dist[i].size();j++) cards.push(make_pair(to[i]+dist[i][j].second, dist[i][j].first)); } for(i=astop+1;i<=bstop;i++) { while(!cards.empty()&&cards.top().second<i)cards.pop(); to[i]=to[i-1]+stops[i]-stops[i-1]; if(!cards.empty()&&cards.top().first<to[i])to[i]=cards.top().first; for(j=0;j<dist[i].size();j++) { cards.push(make_pair(to[i]+dist[i][j].second,dist[i][j].first)); } } cout<<to[bstop]<<"\n"; }
bc58dac51cf18fb60b8f6edc8cff05d799cb0bc7
7d68c33be74521e8f258a16c9b5a57b1b08ecdee
/GPGPU-MultiAgent/TextureUtility.cpp
d3609cd43a91c2af532aae97c51c1e4ba663d762
[]
no_license
khantilpatel/MultiAgentGameAI
9ed2b792fbc310cf8f0b19d7334e3a4ca0e081fb
5029176352564eb321a0bfa62e8194bd38f67968
refs/heads/master
2016-08-07T21:13:34.157428
2014-12-08T23:14:20
2014-12-08T23:14:20
26,804,952
1
0
null
null
null
null
UTF-8
C++
false
false
7,886
cpp
TextureUtility.cpp
#include "TextureUtility.h" using namespace std; ID3D11ShaderResourceView* TextureUtility::CreateRandomTexture1DSRV(ID3D11Device* device) { HRESULT result; // // Create the random data. // XMFLOAT4 randomValues[1024]; for (int i = 0; i < 1024; ++i) { randomValues[i].x = MathUtility::RandF(-1.0f, 100.0f); randomValues[i].y = MathUtility::RandF(-1.0f, 100.0f); randomValues[i].z = MathUtility::RandF(-1.0f, 9.0f); randomValues[i].w = MathUtility::RandF(-1.0f, 50.0f); } D3D11_SUBRESOURCE_DATA initData; initData.pSysMem = randomValues; initData.SysMemPitch = 1024 * sizeof(XMFLOAT4); initData.SysMemSlicePitch = 0; // // Create the texture. // D3D11_TEXTURE1D_DESC texDesc; texDesc.Width = 1024; texDesc.MipLevels = 1; texDesc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; texDesc.Usage = D3D11_USAGE_IMMUTABLE; texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE; texDesc.CPUAccessFlags = 0; texDesc.MiscFlags = 0; texDesc.ArraySize = 1; ID3D11Texture1D* randomTex = 0; device->CreateTexture1D(&texDesc, &initData, &randomTex); // // Create the resource view. // D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc; viewDesc.Format = texDesc.Format; viewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1D; viewDesc.Texture1D.MipLevels = texDesc.MipLevels; viewDesc.Texture1D.MostDetailedMip = 0; ID3D11ShaderResourceView* randomTexSRV = 0; device->CreateShaderResourceView(randomTex, &viewDesc, &randomTexSRV); randomTex->Release(); return randomTexSRV; } ID3D11ShaderResourceView* TextureUtility::CreateRandomTexture2DSRV_New(ID3D11Device* device, ID3D11DeviceContext* deviceContext) { HRESULT result; const int DATA_SIZE = 64; const int DATA_SIZE_BLOCK = 8; const int WALKABLE_NODE = 0; const int COLLISION_NODE = 1; // // Create the random data. // XMFLOAT4 randomValues[DATA_SIZE]; int counter = 0; for (int i = 0; i < DATA_SIZE_BLOCK; i++) { for (int j = 0; j < DATA_SIZE_BLOCK; j++){ randomValues[counter].x = j; //MathUtility::RandF(-1.0f, 100.0f); randomValues[counter].y = i; //MathUtility::RandF(-1.0f, 100.0f); randomValues[counter].z = 0; //MathUtility::RandF(-1.0f, 9.0f); randomValues[counter].w = counter; //MathUtility::RandF(-1.0f, 50.0f); counter = counter + 1; } } // Setup Collision Nodes randomValues[20].z = COLLISION_NODE; randomValues[28].z = COLLISION_NODE; randomValues[36].z = COLLISION_NODE; randomValues[45].z = COLLISION_NODE; randomValues[53].z = COLLISION_NODE; D3D11_SUBRESOURCE_DATA initData; initData.pSysMem = randomValues; initData.SysMemPitch = DATA_SIZE*sizeof(XMFLOAT4); initData.SysMemSlicePitch = 0; // // Create the texture. // D3D11_TEXTURE2D_DESC desc; ZeroMemory(&desc, sizeof(desc)); desc.Width = DATA_SIZE_BLOCK; desc.Height = DATA_SIZE_BLOCK; desc.MipLevels = desc.ArraySize = 1; desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; desc.SampleDesc.Count = 1; desc.Usage = D3D11_USAGE_DYNAMIC; desc.BindFlags = D3D11_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; ID3D11Texture2D *pTexture = NULL; device->CreateTexture2D(&desc, NULL, &pTexture); D3D11_MAPPED_SUBRESOURCE mappedResource; deviceContext->Map(pTexture, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); memcpy(mappedResource.pData, randomValues, sizeof(randomValues)); deviceContext->Unmap(pTexture, 0); // // Create the resource view. // D3D11_SHADER_RESOURCE_VIEW_DESC srDesc; srDesc.Format = desc.Format; srDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; srDesc.Texture2D.MostDetailedMip = 0; srDesc.Texture2D.MipLevels = 1; ID3D11ShaderResourceView *pShaderResView = NULL; device->CreateShaderResourceView(pTexture, &srDesc, &pShaderResView); pTexture->Release(); return pShaderResView; } ID3D11ShaderResourceView* TextureUtility::CreateRandomTexture2DSRV(ID3D11Device* device, ID3D11DeviceContext* deviceContext) { HRESULT result; //const int dimensions = 10; //// //// Create the random data. //// //XMFLOAT4 randomValues[dimensions][dimensions]; //for(int i = 0; i < dimensions; i++) //{ // for(int j = 0; j < dimensions; j++){ // randomValues[i][j] = XMFLOAT4(i,j, 3.0,0.0); // } //} //randomValues[0][0] = XMFLOAT4(0.0,0.0,0.0,0.0); //randomValues[1][1] = XMFLOAT4(1.0,1.0,0.0,0.0); //randomValues[2][2] = XMFLOAT4(2.0,2.0,0.0,0.0); //int sizeTest = sizeof(randomValues); //D3D11_SUBRESOURCE_DATA initData; //initData.pSysMem = randomValues; //initData.SysMemPitch = (dimensions *dimensions)*sizeof(XMFLOAT4); //initData.SysMemSlicePitch = 0; ////D3D11_SUBRESOURCE_DATA *sSubData = new D3D11_SUBRESOURCE_DATA[10]; ////for(int i=0; i<10; i++) { //// sSubData[i].pSysMem = randomValues; //// sSubData[i].SysMemPitch = (dimensions)*sizeof(XMFLOAT4); //// sSubData[i].SysMemSlicePitch = 0; ////} //// //// Create the texture. //// //D3D11_TEXTURE2D_DESC texDesc; //ZeroMemory( &texDesc, sizeof( texDesc ) ); //texDesc.Height = dimensions; //texDesc.Width = dimensions; //texDesc.SampleDesc.Count = 1; //texDesc.SampleDesc.Quality = 0; //texDesc.MipLevels = 1; //texDesc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT; //texDesc.Usage = D3D11_USAGE_IMMUTABLE; //texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE; //texDesc.CPUAccessFlags = 0; //texDesc.MiscFlags = 0; //texDesc.ArraySize = 1; ////XMFLOAT4 randomValues[100] = randomValues[2]; //ID3D11Texture2D* randomTex = 0; //device->CreateTexture2D(&texDesc, &initData, &randomTex); // // //// Create the resource view. //// //D3D11_SHADER_RESOURCE_VIEW_DESC viewDesc; //viewDesc.Format = texDesc.Format; //viewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; //viewDesc.Texture2D.MipLevels = texDesc.MipLevels; //viewDesc.Texture2D.MostDetailedMip = 0; //ID3D11ShaderResourceView* randomTexSRV = 0; //device->CreateShaderResourceView(randomTex, &viewDesc, &randomTexSRV); //randomTex->Release(); /////////////////////////////////////////////////////////////////////////////////// /// New stuff goes here D3D11_TEXTURE2D_DESC desc; ZeroMemory(&desc, sizeof(desc)); desc.Width = 256; desc.Height = 256; desc.MipLevels = desc.ArraySize = 1; desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; desc.SampleDesc.Count = 1; desc.Usage = D3D11_USAGE_DYNAMIC; desc.BindFlags = D3D11_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE; ID3D11Texture2D *pTexture = NULL; device->CreateTexture2D(&desc, NULL, &pTexture); D3D11_MAPPED_SUBRESOURCE mappedResource; deviceContext->Map(pTexture, 0, D3D11_MAP_WRITE_DISCARD, 0, &mappedResource); // Update the vertex buffer here. //memcpy(mappedResource.pData, vertices, sizeof(vertices)); // Reenable GPU access to the vertex buffer data. UCHAR* pTexels = (UCHAR*)mappedResource.pData; for (UINT row = 0; row < desc.Height; row++) { UINT rowStart = row * mappedResource.RowPitch; for (UINT col = 0; col < desc.Width; col++) { UINT colStart = col * 4; pTexels[rowStart + colStart + 0] = 255; // Red pTexels[rowStart + colStart + 1] = 128; // Green pTexels[rowStart + colStart + 2] = 64; // Blue pTexels[rowStart + colStart + 3] = 32; // Alpha } } deviceContext->Unmap(pTexture, 0); D3D11_SHADER_RESOURCE_VIEW_DESC srDesc; srDesc.Format = desc.Format; srDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D; srDesc.Texture2D.MostDetailedMip = 0; srDesc.Texture2D.MipLevels = 1; ID3D11ShaderResourceView *pShaderResView = NULL; device->CreateShaderResourceView(pTexture, &srDesc, &pShaderResView); pTexture->Release(); return pShaderResView; } ID3D11ShaderResourceView* TextureUtility::CreateTextureFromFile(ID3D11Device* device, WCHAR* filename) { HRESULT result; ID3D11ShaderResourceView* texture = 0; // Load the texture in. result = D3DX11CreateShaderResourceViewFromFile(device, filename, NULL, NULL, &texture, NULL); if (FAILED(result)) { return false; } return texture; }
713fbf57fdef5b306b623ff7b7f18f5b5651de04
bcae7c39974b62dfbaccc4cb4ec12282ea2d7807
/Game/Game/BoxCollider.cpp
0d1643885ff8a44608d7a849485d36f3313de98e
[]
no_license
jenspetter/JEngine
dd3f503f22fe5d6d95777c237be9e16d647d06fd
fe7d400cdffa6b8301a7475d598126c79fd667e4
refs/heads/master
2021-07-21T15:52:51.187739
2017-10-30T21:05:13
2017-10-30T21:05:13
null
0
0
null
null
null
null
UTF-8
C++
false
false
485
cpp
BoxCollider.cpp
#include "BoxCollider.h" using namespace JE; BoxCollider::BoxCollider(Sprite& sprite, GameObject& gameObject) : Collider(sprite, gameObject) { } BoxCollider::~BoxCollider() { } GameObject* BoxCollider::Collide() { for (auto it = collideableObjects.begin(); it != collideableObjects.end(); ++it) { if (GetSprite().GetSprite().getGlobalBounds().intersects(it->second.GetSprite().GetSprite().getGlobalBounds())) { return &it->second.GetGameObject(); } } return nullptr; }
76d95b6a00416c9f5434ed6edc3e900e3112f27a
8829efaf0f96c0c0b93b333083177d7caa4178a9
/src/foto360.ino
6e70b17ea0adc41bc48d9caa44aacdafdf51db64
[]
no_license
obeper/360-foto
f95bd215e73aacecaee30ec3b6364173bf7bb1c9
fd86db2b34a14679412f917bdfa65663e4b29868
refs/heads/master
2021-01-23T22:53:48.575170
2014-09-22T19:32:47
2014-09-22T19:32:47
null
0
0
null
null
null
null
UTF-8
C++
false
false
21,081
ino
foto360.ino
#include <inttypes.h> #include <avr/pgmspace.h> #include <avrpins.h> #include <max3421e.h> #include <usbhost.h> #include <usb_ch9.h> #include <Usb.h> #include <usbhub.h> #include <address.h> #include <message.h> #include <ptp.h> #include <canoneos.h> #include "MainDisplay.h" #include "AccelStepper.h" #include "Arduino.h" #include "RotateCamera.h" #include "BatterySensor.h" #include "PanoramaSettings.h" #include "Bluetooth.h" #include "AngularSensor.h" enum ProgramState {PGM_SETUP, PGM_READY,PGM_STARTED, PGM_RUNNING, CAMERA_IN_POSITION, HDR_IS_TAKEN, PGM_DONE, PGM_PAUSED, PGM_RESUMED, PGM_RESET, PGM_BT_RUN_MOTORS}; enum ProcessEvent {EVT_NOTHING, EVT_NEW, EVT_RUN_MOTORS, EVT_CHANGE_CAMERA_PROPERTY, EVT_TAKE_PHOTO, EVT_LAST_PICTURE_IS_TAKEN}; enum CameraEvent {EVT_BT_NOTHING, EVT_BT_CHANGE_PROP, EVT_BT_TAKE_PHOTO, EVT_BT_RUN_MOTORS, EVT_SETUP_CAMERA_SETTINGS}; ////////////////////////////////////////////// ////////////////////MAINPROGRAM/////////////// ////////////////////////////////////////////// //DEFINE MAIN OBJECTS AND CONSTANTS #define BATTERY_READ_INTERVAL 5000 // mSEC #define BATTERY_UPDATE_INTERVAL 20000 // mSEC #define STARTING_DELAY_TIMER 6 // SEC #define RESUME_DELAY_TIMER 6 // SEC #define BUTTON_DELAY_TIMER 1500 // mSEC #define RESET_DELAY_TIMER 5000 // mSEC #define BUTTON_DELAY_TO_RESET 2500 // mSEC #define BT_SHOW_INFO_SCREEN_DELAY 3000 // mSEC //int tiltReadAnalogPin, int tiltStepperDirPin, int tiltStepperStepPin, //int panReadAnalogPin, int panStepperDirPin, int panStepperStepPin RotateCamera camera( 1, 26, 9, 0 , 25, 10); //int rs, int enable,int d4, int d5, int d6, int d7) MainDisplay display(22,13,12,23,11,24); BatterySensor battery(2); Bluetooth bluetooth(6); //Camera 15.0 brännvidd, sensorH 22.3, sensorV 14.3, overlap 1.2 PanoramaSettings panoramaSettings(15.0, 22.3, 14.9, 0.2); ProgramState currentState; //USERINTERFACE PINS int startButtonPin = 2; int statusLedRGB[3] = {4,5,3}; //TIMERS int batteryPercentage; unsigned long lastBatteryReadTime; unsigned long lastBatteryUpdateTime; unsigned long lastTimeToStartTime; unsigned long lastTimeButtonWasPressed; unsigned long lastTimeToResetTime; unsigned long lastTimeTimeLeftWasUpdated; unsigned long buttonPressedTime; unsigned long currentTime; unsigned long lastTimeBTPropertyChanged; //CONTROL GLOBALS bool wasHigh; bool startByBluetooth; int timeToStartSec; //DEBUG unsigned long lastDebugTime; //FOTO SETTINGS int cameraPropertyName; int cameraPropertyValue; //BT int btMotorDirection = 0; //FOTOPROCESS VARIABLES int currentPictureNr; int lastPictureNr; int timeLeftOfProcess; int pictureNrInCurrentHDR; int evValue; int shutterSpeedValue; bool cameraPhotoIsTaken; bool cameraPropertyChanged; bool cameraConnected; bool cameraSetupComplete; //EVENT ENUMS ProcessEvent currentProcessEvent; CameraEvent currentCameraEvent; //CAMERA CONTROL CLASS class CamStateHandlers : public PTPStateHandlers { bool stateConnected; int setupPropertyCounter; public: CamStateHandlers() : stateConnected(false) {}; virtual void OnDeviceDisconnectedState(PTP *ptp); virtual void OnDeviceInitializedState(PTP *ptp); } CamStates; USB Usb; USBHub Hub1(&Usb); CanonEOS Eos(&Usb, &CamStates); bool pictureIsTaken; void CamStateHandlers::OnDeviceDisconnectedState(PTP *ptp) { if (stateConnected) { stateConnected = false; cameraConnected = false; Notify(PSTR("Camera disconnected\r\n"),0x80); } } void CamStateHandlers::OnDeviceInitializedState(PTP *ptp) { static unsigned long next_time = 0; if (!stateConnected){ setupPropertyCounter = 0; cameraConnected = true; stateConnected = true; } unsigned long time_now = millis(); if (time_now > next_time) { next_time = time_now + 300; if(currentProcessEvent == EVT_TAKE_PHOTO && !cameraPhotoIsTaken){ uint16_t rc = Eos.Capture(); if (rc == PTP_RC_OK){ cameraPhotoIsTaken = true; } }else if(currentProcessEvent == EVT_CHANGE_CAMERA_PROPERTY && !cameraPropertyChanged){ uint16_t rc2 = Eos.SetProperty(EOS_DPC_ShutterSpeed, shutterSpeedValue); if(rc2 == PTP_RC_OK){ cameraPropertyChanged = true; } }else if(currentCameraEvent == EVT_BT_CHANGE_PROP){ uint16_t rc2 = Eos.SetProperty(cameraPropertyName, cameraPropertyValue); if(rc2 == PTP_RC_OK){ bluetooth.updated(); currentCameraEvent = EVT_BT_NOTHING; } }else if (currentCameraEvent == EVT_BT_TAKE_PHOTO){ uint16_t rc = Eos.Capture(); if (rc == PTP_RC_OK){ bluetooth.updated(); currentCameraEvent = EVT_BT_NOTHING; } }else if (currentCameraEvent == EVT_SETUP_CAMERA_SETTINGS){ int properties[5] = {EOS_DPC_Iso, EOS_DPC_Aperture, EOS_DPC_WhiteBalance, EOS_DPC_AFMode, EOS_DPC_DriveMode}; int propVal[5] = {72, 63, 1, 0, 0}; uint16_t rc = Eos.SetProperty(properties[setupPropertyCounter], propVal[setupPropertyCounter]); if(rc == PTP_RC_OK){ setupPropertyCounter++; } if(setupPropertyCounter == 5){ setupPropertyCounter = 0; cameraSetupComplete = true; currentCameraEvent = EVT_BT_NOTHING; } } } } void setup() { Serial.begin(9600); //START BLUETOOTH Serial2.begin(115200); int timeNow = millis(); display.onScreen(); //START USB if (Usb.Init() == -1) Serial.println("OSC did not start."); //PGM DEFAULTS currentState = PGM_SETUP; currentProcessEvent = EVT_NOTHING; pinMode(startButtonPin, INPUT); pinMode(statusLedRGB[0], OUTPUT); pinMode(statusLedRGB[1], OUTPUT); pinMode(statusLedRGB[2], OUTPUT); //RESET ALL TIMERS lastBatteryReadTime = timeNow; lastTimeToStartTime = timeNow; lastTimeButtonWasPressed = timeNow; lastTimeToResetTime = timeNow; lastDebugTime = timeNow; lastBatteryUpdateTime = timeNow; lastTimeTimeLeftWasUpdated = timeNow; lastTimeBTPropertyChanged = timeNow; buttonPressedTime = 0; wasHigh = false; timeToStartSec = STARTING_DELAY_TIMER; currentPictureNr = 0; lastPictureNr = 0; //Statndard väden som panoramainställningar shutterSpeedValue = 386; panoramaSettings.setPlusMinusEv(3); panoramaSettings.setMiddShutterSpeed(shutterSpeedValue); cameraSetupComplete = false; cameraConnected = false; display.setRefreshRate(800); delay(1400); battery.readVoltage(); delay(200); battery.readVoltage(); delay(200); battery.readVoltage(); delay(200); batteryPercentage = battery.readPercentage(); } void loop() { currentTime = millis(); /* if(currentTime > (1000 + lastDebugTime)){ Serial.println("--------------"); Serial.println("Current State:"); Serial.println(currentState); Serial.println("Process State"); Serial.println(currentProcessEvent); Serial.println("ShutterSpeed:"); Serial.println(cameraConnected); lastDebugTime = currentTime; } */ //READ BATTERY ONCE EVERY 5 SEC TO GET MEAN VALUE if(currentTime > (lastBatteryReadTime + BATTERY_READ_INTERVAL)){ battery.readVoltage(); lastBatteryReadTime = currentTime; } //UPDATE BATTERY ONCE EVERY 5 SEC if(currentTime > (lastBatteryUpdateTime + BATTERY_UPDATE_INTERVAL)){ batteryPercentage = battery.readPercentage(); lastBatteryUpdateTime = currentTime; } //WHAT TO LOOP - CHECK PRPGRAM_STATE switch(currentState){ //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_SETUP: display.connectCameraScreen(); Usb.Task(); if(cameraConnected){ currentState = PGM_READY; } break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_READY: analogWrite(statusLedRGB[1], 15); analogWrite(statusLedRGB[0], 0); if(currentTime > (lastTimeBTPropertyChanged + BT_SHOW_INFO_SCREEN_DELAY)){ display.readyScreen(batteryPercentage); } Usb.Task(); if(!cameraConnected){ currentState = PGM_SETUP; }else if(!cameraSetupComplete){ currentCameraEvent = EVT_SETUP_CAMERA_SETTINGS; } //CHECK START/STOP BUTTON PRESS if((digitalRead(startButtonPin) == HIGH && currentTime > (lastTimeButtonWasPressed + BUTTON_DELAY_TIMER) )|| startByBluetooth){ startByBluetooth = false; currentState = PGM_STARTED; analogWrite(statusLedRGB[0],15); analogWrite(statusLedRGB[1],0); // Zero Process variables currentPictureNr = 0; lastPictureNr = 0; cameraPropertyChanged = false; cameraPhotoIsTaken = false; currentProcessEvent = EVT_NEW; } break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_STARTED: //COUNTDOWN TO START if(currentTime > lastTimeToStartTime + 1000){ display.startScreen(timeToStartSec); lastTimeToStartTime = currentTime; timeToStartSec--; if(timeToStartSec == 0){ timeToStartSec = STARTING_DELAY_TIMER; currentState = PGM_RUNNING; lastTimeToStartTime = 0; } } break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_RUNNING: //Check button for PAUS-ACTION if(digitalRead(startButtonPin) == HIGH && currentTime > (lastTimeButtonWasPressed + BUTTON_DELAY_TIMER )){ currentState = PGM_PAUSED; lastTimeButtonWasPressed = currentTime; } //Decrease time left if(currentTime > (lastTimeTimeLeftWasUpdated + 1000)){ timeLeftOfProcess -= 1; lastTimeTimeLeftWasUpdated = currentTime; } display.runningScreen(currentPictureNr,lastPictureNr,batteryPercentage,timeLeftOfProcess); switch(currentProcessEvent){ case EVT_NEW: //CALC CAMERA CORDINATES - NR OF PICTURES // INIIT EVERTHING FOR NEW PROCESS currentCameraEvent = EVT_BT_NOTHING; timeLeftOfProcess = 4000; currentPictureNr = 1; pictureNrInCurrentHDR = 1; evValue = panoramaSettings.getPlusMinusEv(); lastPictureNr = panoramaSettings.getNrOfPictures(); currentProcessEvent = EVT_RUN_MOTORS; break; case EVT_RUN_MOTORS: //MOVE CAMERA TO array cordinates(currentPictureNr) camera.move(panoramaSettings.calcPanCordinate(currentPictureNr-1), panoramaSettings.calcTiltCordinate(currentPictureNr-1)); if(camera.inPosition()){ currentProcessEvent = EVT_CHANGE_CAMERA_PROPERTY; } //Check for cameraInPosition and set evt_CHANGE_CAMERA_PROPERTY break; case EVT_CHANGE_CAMERA_PROPERTY: if(pictureNrInCurrentHDR <= 2*evValue +1){ int currentEv = -1*evValue + pictureNrInCurrentHDR - 1; shutterSpeedValue = panoramaSettings.getShutterSpeed(currentEv); cameraPropertyChanged = false; Usb.Task(); if(cameraPropertyChanged){ cameraPhotoIsTaken = false; currentProcessEvent = EVT_TAKE_PHOTO; } }else{ if(currentPictureNr >= lastPictureNr){ currentState = PGM_DONE; }else{ pictureNrInCurrentHDR = 1; currentPictureNr++; currentProcessEvent = EVT_RUN_MOTORS; } } // SET WHAT SHOULD CHANGE AND SPAM Usb.Task(); break; case EVT_TAKE_PHOTO: // SPAM TAKE PHOTO Usb.Task(); Usb.Task(); if(cameraPhotoIsTaken){ pictureNrInCurrentHDR++; currentProcessEvent = EVT_CHANGE_CAMERA_PROPERTY; } break; } break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_PAUSED: if(digitalRead(startButtonPin) == HIGH && currentTime > (lastTimeButtonWasPressed + BUTTON_DELAY_TIMER )){ if(!wasHigh){ buttonPressedTime = currentTime; } wasHigh = true; } if(digitalRead(startButtonPin) == LOW && wasHigh){ buttonPressedTime = currentTime - buttonPressedTime; if (buttonPressedTime < BUTTON_DELAY_TO_RESET) { currentState = PGM_RESUMED; } wasHigh = false; lastTimeButtonWasPressed = currentTime; } if(digitalRead(startButtonPin) == HIGH && wasHigh && currentTime > ( buttonPressedTime + BUTTON_DELAY_TO_RESET) ){ currentState = PGM_RESET; lastTimeToResetTime = currentTime; wasHigh = false; lastTimeButtonWasPressed = currentTime; } display.pauseScreen(currentPictureNr,lastPictureNr,batteryPercentage,timeLeftOfProcess); break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_RESUMED: if(currentTime > lastTimeToStartTime + 1000){ display.resumeScreen(timeToStartSec); lastTimeToStartTime = currentTime; timeToStartSec--; if(timeToStartSec == 0){ timeToStartSec = RESUME_DELAY_TIMER; currentState = PGM_RUNNING; lastTimeToStartTime = 0; } } break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_RESET: display.resettingScreen(); //NOLLSTÄLLA ALLT currentProcessEvent = EVT_NOTHING; if(currentTime > lastTimeToResetTime + RESET_DELAY_TIMER ){ currentState = PGM_SETUP; } break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// case PGM_DONE: display.doneScreen(currentPictureNr,lastPictureNr,batteryPercentage,timeLeftOfProcess); //CHECK START/STOP BUTTON PRESS if(digitalRead(startButtonPin) == HIGH){ currentState = PGM_READY; lastTimeButtonWasPressed = currentTime; } break; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// } //CHECK BLUETOOTH if(bluetooth.newDataToRead()){ bluetooth.handleAction(); if(bluetooth.updateShutterVariable() && currentState == PGM_READY){ display.propertyChangedScreen(batteryPercentage,"SS CHANGED"); lastTimeBTPropertyChanged = currentTime; panoramaSettings.setMiddShutterSpeed(bluetooth.readPropertyValue()); bluetooth.updated(); }else if(bluetooth.updateEvVariable() && currentState == PGM_READY){ display.propertyChangedScreen(batteryPercentage,"EV CHANGED"); lastTimeBTPropertyChanged = currentTime; panoramaSettings.setPlusMinusEv(bluetooth.readPropertyValue()); bluetooth.updated(); }else if(bluetooth.updateFocalLength() && currentState == PGM_READY){ display.propertyChangedScreen(batteryPercentage,"FL CHANGED"); lastTimeBTPropertyChanged = currentTime; panoramaSettings.setFocalLength(bluetooth.readPropertyValue()); bluetooth.updated(); }else if(bluetooth.updateCameraSetting() && currentState == PGM_READY){ display.propertyChangedScreen(batteryPercentage,"PROPERTY CHANGED"); lastTimeBTPropertyChanged = currentTime; currentCameraEvent = EVT_BT_CHANGE_PROP; cameraPropertyName = bluetooth.readPropertyName(); cameraPropertyValue = bluetooth.readPropertyValue(); }else if(bluetooth.shouldTakePicture() && currentState == PGM_READY){ currentCameraEvent = EVT_BT_TAKE_PHOTO; }else if(bluetooth.startStopProgram()){ if(currentState == PGM_RUNNING){ currentState = PGM_PAUSED; }else if(currentState == PGM_READY){ startByBluetooth = true; }else if(currentState == PGM_PAUSED){ currentState = PGM_RESUMED; } bluetooth.updated(); }else if(bluetooth.moveCameraUp() && currentState == PGM_READY){ currentCameraEvent = EVT_BT_RUN_MOTORS; btMotorDirection = 1; }else if(bluetooth.moveCameraDown() && currentState == PGM_READY){ currentCameraEvent = EVT_BT_RUN_MOTORS; btMotorDirection = 2; }else if(bluetooth.moveCameraLeft() && currentState == PGM_READY){ currentCameraEvent = EVT_BT_RUN_MOTORS; btMotorDirection = 3; }else if(bluetooth.moveCameraRight() && currentState == PGM_READY){ currentCameraEvent = EVT_BT_RUN_MOTORS; btMotorDirection = 4; }else if(bluetooth.moveCameraHome() && currentState == PGM_READY){ currentCameraEvent = EVT_BT_RUN_MOTORS; btMotorDirection = -1; }else if(bluetooth.moveCameraStop() && currentState == PGM_READY){ currentCameraEvent = EVT_BT_RUN_MOTORS; btMotorDirection = 0; } delay(1); } ///MANUAL CONTROL OF MOTORS if(currentCameraEvent == EVT_BT_RUN_MOTORS){ switch(btMotorDirection){ case -1: camera.move(0.0, 0.0); if(camera.inPosition()){ currentCameraEvent = EVT_BT_NOTHING; bluetooth.updated(); } break; case 0: camera.stop(); bluetooth.updated(); currentCameraEvent = EVT_BT_NOTHING; break; case 1: //UP camera.runUp(); break; case 2: //Down camera.runDown(); break; case 3: //Left camera.runLeft(); break; case 4: //RIGHT camera.runRight(); break; } } }
e4e76071d2a634372ecfc4b6733f75c6f9bc476d
2f1a092537d8650cacbd274a3bd600e87a627e90
/thrift/test/testset/golden/Testset.h
120598f3ce3b1bad8a26ee8bf5955afa33d4d8f0
[ "Apache-2.0" ]
permissive
ConnectionMaster/fbthrift
3aa7d095c00b04030fddbabffbf09a5adca29d42
d5d0fa3f72ee0eb4c7b955e9e04a25052678d740
refs/heads/master
2023-04-10T17:49:05.409858
2021-08-03T02:32:49
2021-08-03T02:33:57
187,603,239
1
1
Apache-2.0
2023-04-03T23:15:28
2019-05-20T08:49:29
C++
UTF-8
C++
false
false
115,718
h
Testset.h
// This file was generated by `thrift/test/testset/generator.py` // @generated #pragma once #include <fatal/type/sequence.h> #include <fatal/type/sort.h> #include <thrift/conformance/cpp2/ThriftTypes.h> #include <thrift/test/testset/gen-cpp2/testset_types.h> namespace apache::thrift::test::testset { enum class FieldModifier { Optional = 1, Required, Reference, Lazy, }; namespace detail { template <FieldModifier... Ms> using mod_set = fatal::sort<fatal::sequence<FieldModifier, Ms...>>; template <typename T, typename Ms> struct struct_ByFieldType; template <typename T, typename Ms> struct exception_ByFieldType; template <typename T, typename Ms> struct union_ByFieldType; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<>> { using type = struct_list_bool; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<>> { using type = struct_list_byte; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<>> { using type = struct_list_i16; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<>> { using type = struct_list_i32; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<>> { using type = struct_list_i64; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<>> { using type = struct_list_float; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<>> { using type = struct_list_double; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<>> { using type = struct_list_binary; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<>> { using type = struct_list_string; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<>> { using type = struct_set_string; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<>> { using type = struct_set_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<>> { using type = struct_map_string_bool; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<>> { using type = struct_map_string_byte; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<>> { using type = struct_map_string_i16; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<>> { using type = struct_map_string_i32; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<>> { using type = struct_map_string_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<>> { using type = struct_map_string_float; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<>> { using type = struct_map_string_double; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<>> { using type = struct_map_string_binary; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<>> { using type = struct_map_string_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<>> { using type = struct_map_i64_bool; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<>> { using type = struct_map_i64_byte; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<>> { using type = struct_map_i64_i16; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<>> { using type = struct_map_i64_i32; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<>> { using type = struct_map_i64_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<>> { using type = struct_map_i64_float; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<>> { using type = struct_map_i64_double; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<>> { using type = struct_map_i64_binary; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<>> { using type = struct_map_i64_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<>> { using type = struct_map_string_set_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<>> { using type = struct_map_string_set_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<>> { using type = struct_map_i64_set_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<>> { using type = struct_map_i64_set_i64; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = struct_list_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = struct_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = struct_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference>> { using type = struct_map_string_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference>> { using type = struct_map_i64_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::bool_t, mod_set<>> { using type = struct_bool; }; template <> struct struct_ByFieldType<conformance::type::byte_t, mod_set<>> { using type = struct_byte; }; template <> struct struct_ByFieldType<conformance::type::i16_t, mod_set<>> { using type = struct_i16; }; template <> struct struct_ByFieldType<conformance::type::i32_t, mod_set<>> { using type = struct_i32; }; template <> struct struct_ByFieldType<conformance::type::i64_t, mod_set<>> { using type = struct_i64; }; template <> struct struct_ByFieldType<conformance::type::float_t, mod_set<>> { using type = struct_float; }; template <> struct struct_ByFieldType<conformance::type::double_t, mod_set<>> { using type = struct_double; }; template <> struct struct_ByFieldType<conformance::type::binary_t, mod_set<>> { using type = struct_binary; }; template <> struct struct_ByFieldType<conformance::type::string_t, mod_set<>> { using type = struct_string; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_bool; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_byte; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_i16; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_i32; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_i64; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_float; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_double; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_binary; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_list_string; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_set_string; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_set_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_bool; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_byte; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_i16; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_i32; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_float; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_double; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_binary; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_bool; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_byte; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_i16; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_i32; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_float; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_double; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_binary; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_set_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_string_set_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_set_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Optional>> { using type = struct_optional_map_i64_set_i64; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_list_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_string_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = struct_optional_map_i64_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::bool_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_bool; }; template <> struct struct_ByFieldType<conformance::type::byte_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_byte; }; template <> struct struct_ByFieldType<conformance::type::i16_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_i16; }; template <> struct struct_ByFieldType<conformance::type::i32_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_i32; }; template <> struct struct_ByFieldType<conformance::type::i64_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_i64; }; template <> struct struct_ByFieldType<conformance::type::float_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_float; }; template <> struct struct_ByFieldType<conformance::type::double_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_double; }; template <> struct struct_ByFieldType<conformance::type::binary_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_binary; }; template <> struct struct_ByFieldType<conformance::type::string_t, mod_set<FieldModifier::Optional>> { using type = struct_optional_string; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_bool; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_byte; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_i16; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_i32; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_i64; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_float; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_double; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_binary; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = struct_required_list_string; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = struct_required_set_string; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = struct_required_set_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_bool; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_byte; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_i16; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_i32; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_float; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_double; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_binary; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_bool; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_byte; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_i16; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_i32; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_float; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_double; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_binary; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_set_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Required>> { using type = struct_required_map_string_set_i64; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_set_string; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Required>> { using type = struct_required_map_i64_set_i64; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_list_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_bool_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_byte_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_i16_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_i32_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_float_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_double_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_binary_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_string_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_set_string_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = struct_required_map_i64_set_i64_cpp_ref; }; template <> struct struct_ByFieldType<conformance::type::bool_t, mod_set<FieldModifier::Required>> { using type = struct_required_bool; }; template <> struct struct_ByFieldType<conformance::type::byte_t, mod_set<FieldModifier::Required>> { using type = struct_required_byte; }; template <> struct struct_ByFieldType<conformance::type::i16_t, mod_set<FieldModifier::Required>> { using type = struct_required_i16; }; template <> struct struct_ByFieldType<conformance::type::i32_t, mod_set<FieldModifier::Required>> { using type = struct_required_i32; }; template <> struct struct_ByFieldType<conformance::type::i64_t, mod_set<FieldModifier::Required>> { using type = struct_required_i64; }; template <> struct struct_ByFieldType<conformance::type::float_t, mod_set<FieldModifier::Required>> { using type = struct_required_float; }; template <> struct struct_ByFieldType<conformance::type::double_t, mod_set<FieldModifier::Required>> { using type = struct_required_double; }; template <> struct struct_ByFieldType<conformance::type::binary_t, mod_set<FieldModifier::Required>> { using type = struct_required_binary; }; template <> struct struct_ByFieldType<conformance::type::string_t, mod_set<FieldModifier::Required>> { using type = struct_required_string; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_bool_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_byte_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_i16_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_i32_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_i64_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_float_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_double_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_binary_lazy; }; template <> struct struct_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = struct_list_string_lazy; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = struct_set_string_lazy; }; template <> struct struct_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = struct_set_i64_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_bool_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_byte_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_i16_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_i32_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_i64_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_float_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_double_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_binary_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_string_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_bool_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_byte_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_i16_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_i32_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_i64_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_float_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_double_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_binary_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_string_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_set_string_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Lazy>> { using type = struct_map_string_set_i64_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_set_string_lazy; }; template <> struct struct_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Lazy>> { using type = struct_map_i64_set_i64_lazy; }; template <> struct struct_ByFieldType<conformance::type::string_t, mod_set<FieldModifier::Lazy>> { using type = struct_string_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<>> { using type = exception_list_bool; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<>> { using type = exception_list_byte; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<>> { using type = exception_list_i16; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<>> { using type = exception_list_i32; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<>> { using type = exception_list_i64; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<>> { using type = exception_list_float; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<>> { using type = exception_list_double; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<>> { using type = exception_list_binary; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<>> { using type = exception_list_string; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<>> { using type = exception_set_string; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<>> { using type = exception_set_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<>> { using type = exception_map_string_bool; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<>> { using type = exception_map_string_byte; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<>> { using type = exception_map_string_i16; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<>> { using type = exception_map_string_i32; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<>> { using type = exception_map_string_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<>> { using type = exception_map_string_float; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<>> { using type = exception_map_string_double; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<>> { using type = exception_map_string_binary; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<>> { using type = exception_map_string_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<>> { using type = exception_map_i64_bool; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<>> { using type = exception_map_i64_byte; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<>> { using type = exception_map_i64_i16; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<>> { using type = exception_map_i64_i32; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<>> { using type = exception_map_i64_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<>> { using type = exception_map_i64_float; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<>> { using type = exception_map_i64_double; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<>> { using type = exception_map_i64_binary; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<>> { using type = exception_map_i64_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<>> { using type = exception_map_string_set_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<>> { using type = exception_map_string_set_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<>> { using type = exception_map_i64_set_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<>> { using type = exception_map_i64_set_i64; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = exception_list_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = exception_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = exception_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference>> { using type = exception_map_string_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference>> { using type = exception_map_i64_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::bool_t, mod_set<>> { using type = exception_bool; }; template <> struct exception_ByFieldType<conformance::type::byte_t, mod_set<>> { using type = exception_byte; }; template <> struct exception_ByFieldType<conformance::type::i16_t, mod_set<>> { using type = exception_i16; }; template <> struct exception_ByFieldType<conformance::type::i32_t, mod_set<>> { using type = exception_i32; }; template <> struct exception_ByFieldType<conformance::type::i64_t, mod_set<>> { using type = exception_i64; }; template <> struct exception_ByFieldType<conformance::type::float_t, mod_set<>> { using type = exception_float; }; template <> struct exception_ByFieldType<conformance::type::double_t, mod_set<>> { using type = exception_double; }; template <> struct exception_ByFieldType<conformance::type::binary_t, mod_set<>> { using type = exception_binary; }; template <> struct exception_ByFieldType<conformance::type::string_t, mod_set<>> { using type = exception_string; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_bool; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_byte; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_i16; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_i32; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_i64; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_float; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_double; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_binary; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_list_string; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_set_string; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_set_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_bool; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_byte; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_i16; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_i32; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_float; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_double; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_binary; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_bool; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_byte; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_i16; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_i32; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_float; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_double; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_binary; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_set_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_string_set_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_set_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Optional>> { using type = exception_optional_map_i64_set_i64; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_list_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_string_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Optional>> { using type = exception_optional_map_i64_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::bool_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_bool; }; template <> struct exception_ByFieldType<conformance::type::byte_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_byte; }; template <> struct exception_ByFieldType<conformance::type::i16_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_i16; }; template <> struct exception_ByFieldType<conformance::type::i32_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_i32; }; template <> struct exception_ByFieldType<conformance::type::i64_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_i64; }; template <> struct exception_ByFieldType<conformance::type::float_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_float; }; template <> struct exception_ByFieldType<conformance::type::double_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_double; }; template <> struct exception_ByFieldType<conformance::type::binary_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_binary; }; template <> struct exception_ByFieldType<conformance::type::string_t, mod_set<FieldModifier::Optional>> { using type = exception_optional_string; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_bool; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_byte; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_i16; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_i32; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_i64; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_float; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_double; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_binary; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = exception_required_list_string; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = exception_required_set_string; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = exception_required_set_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_bool; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_byte; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_i16; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_i32; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_float; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_double; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_binary; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_bool; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_byte; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_i16; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_i32; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_float; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_double; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_binary; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_set_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Required>> { using type = exception_required_map_string_set_i64; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_set_string; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Required>> { using type = exception_required_map_i64_set_i64; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_list_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_bool_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_byte_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_i16_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_i32_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_float_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_double_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_binary_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_string_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_set_string_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference, FieldModifier::Required>> { using type = exception_required_map_i64_set_i64_cpp_ref; }; template <> struct exception_ByFieldType<conformance::type::bool_t, mod_set<FieldModifier::Required>> { using type = exception_required_bool; }; template <> struct exception_ByFieldType<conformance::type::byte_t, mod_set<FieldModifier::Required>> { using type = exception_required_byte; }; template <> struct exception_ByFieldType<conformance::type::i16_t, mod_set<FieldModifier::Required>> { using type = exception_required_i16; }; template <> struct exception_ByFieldType<conformance::type::i32_t, mod_set<FieldModifier::Required>> { using type = exception_required_i32; }; template <> struct exception_ByFieldType<conformance::type::i64_t, mod_set<FieldModifier::Required>> { using type = exception_required_i64; }; template <> struct exception_ByFieldType<conformance::type::float_t, mod_set<FieldModifier::Required>> { using type = exception_required_float; }; template <> struct exception_ByFieldType<conformance::type::double_t, mod_set<FieldModifier::Required>> { using type = exception_required_double; }; template <> struct exception_ByFieldType<conformance::type::binary_t, mod_set<FieldModifier::Required>> { using type = exception_required_binary; }; template <> struct exception_ByFieldType<conformance::type::string_t, mod_set<FieldModifier::Required>> { using type = exception_required_string; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_bool_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_byte_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_i16_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_i32_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_i64_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_float_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_double_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_binary_lazy; }; template <> struct exception_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = exception_list_string_lazy; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = exception_set_string_lazy; }; template <> struct exception_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = exception_set_i64_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_bool_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_byte_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_i16_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_i32_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_i64_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_float_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_double_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_binary_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_string_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_bool_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_byte_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_i16_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_i32_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_i64_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_float_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_double_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_binary_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_string_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_set_string_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Lazy>> { using type = exception_map_string_set_i64_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_set_string_lazy; }; template <> struct exception_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Lazy>> { using type = exception_map_i64_set_i64_lazy; }; template <> struct exception_ByFieldType<conformance::type::string_t, mod_set<FieldModifier::Lazy>> { using type = exception_string_lazy; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<>> { using type = union_list_bool; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<>> { using type = union_list_byte; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<>> { using type = union_list_i16; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<>> { using type = union_list_i32; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<>> { using type = union_list_i64; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<>> { using type = union_list_float; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<>> { using type = union_list_double; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<>> { using type = union_list_binary; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<>> { using type = union_list_string; }; template <> struct union_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<>> { using type = union_set_string; }; template <> struct union_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<>> { using type = union_set_i64; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<>> { using type = union_map_string_bool; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<>> { using type = union_map_string_byte; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<>> { using type = union_map_string_i16; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<>> { using type = union_map_string_i32; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<>> { using type = union_map_string_i64; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<>> { using type = union_map_string_float; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<>> { using type = union_map_string_double; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<>> { using type = union_map_string_binary; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<>> { using type = union_map_string_string; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<>> { using type = union_map_i64_bool; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<>> { using type = union_map_i64_byte; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<>> { using type = union_map_i64_i16; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<>> { using type = union_map_i64_i32; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<>> { using type = union_map_i64_i64; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<>> { using type = union_map_i64_float; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<>> { using type = union_map_i64_double; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<>> { using type = union_map_i64_binary; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<>> { using type = union_map_i64_string; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<>> { using type = union_map_string_set_string; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<>> { using type = union_map_string_set_i64; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<>> { using type = union_map_i64_set_string; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<>> { using type = union_map_i64_set_i64; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = union_list_bool_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = union_list_byte_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = union_list_i16_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = union_list_i32_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = union_list_i64_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = union_list_float_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = union_list_double_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = union_list_binary_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::list<conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = union_list_string_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::set<conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = union_set_string_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::set<conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = union_set_i64_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_bool_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_byte_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_i16_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_i32_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_i64_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_float_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_double_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_binary_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = union_map_string_string_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::bool_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_bool_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::byte_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_byte_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i16_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_i16_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i32_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_i32_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::i64_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_i64_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::float_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_float_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::double_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_double_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::binary_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_binary_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::string_t>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_string_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference>> { using type = union_map_string_set_string_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::string_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference>> { using type = union_map_string_set_i64_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::string_t>>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_set_string_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::map<conformance::type::i64_t, conformance::type::set<conformance::type::i64_t>>, mod_set<FieldModifier::Reference>> { using type = union_map_i64_set_i64_cpp_ref; }; template <> struct union_ByFieldType<conformance::type::bool_t, mod_set<>> { using type = union_bool; }; template <> struct union_ByFieldType<conformance::type::byte_t, mod_set<>> { using type = union_byte; }; template <> struct union_ByFieldType<conformance::type::i16_t, mod_set<>> { using type = union_i16; }; template <> struct union_ByFieldType<conformance::type::i32_t, mod_set<>> { using type = union_i32; }; template <> struct union_ByFieldType<conformance::type::i64_t, mod_set<>> { using type = union_i64; }; template <> struct union_ByFieldType<conformance::type::float_t, mod_set<>> { using type = union_float; }; template <> struct union_ByFieldType<conformance::type::double_t, mod_set<>> { using type = union_double; }; template <> struct union_ByFieldType<conformance::type::binary_t, mod_set<>> { using type = union_binary; }; template <> struct union_ByFieldType<conformance::type::string_t, mod_set<>> { using type = union_string; }; } // namespace detail template <typename T, FieldModifier... Ms> using struct_with = typename detail::struct_ByFieldType<T, detail::mod_set<Ms...>>::type; template <typename T, FieldModifier... Ms> using exception_with = typename detail::exception_ByFieldType<T, detail::mod_set<Ms...>>::type; template <typename T, FieldModifier... Ms> using union_with = typename detail::union_ByFieldType<T, detail::mod_set<Ms...>>::type; } // namespace apache::thrift::test::testset
ab9f80661f53bc154648b90ec0eb22c495431fce
0b8f9cdddfd5efd6a99c8f8ab2502928d47d6c1c
/MARS (0238).cpp
fcb199992924d7ce4cefb3927dd81a967cc0b37a
[ "Unlicense" ]
permissive
michaelarakel/acmp-solutions
b2e2d27e26f47dedf8577df3c451294e1a631973
56b853805854d0f0c0131c59c7a48e207c35b15f
refs/heads/master
2021-07-09T22:30:31.836282
2017-10-08T18:22:26
2017-10-08T18:22:26
106,199,110
1
0
null
null
null
null
UTF-8
C++
false
false
2,942
cpp
MARS (0238).cpp
#include <iostream> #include <queue> #include <algorithm> #include <vector> using namespace std; struct tunnel { int x1; int y1; int x2; int y2; }; istream& operator >> (istream& input, tunnel& a) { input >> a.x1 >> a.y1 >> a.x2 >> a.y2; --a.x1; --a.x2; --a.y1; --a.y2; return input; } void print (const vector <vector <char> >& v) { for (int i = 0; i < v.size(); ++i) { for (int j = 0; j < v[i].size(); ++j) cout << v[i][j] << " "; cout << endl; } } void bfs(vector <vector <char> >& v, const pair <int, int> start, const vector <tunnel>& t) { queue <pair <int, int> > q; q.push(start); const int a[] = {1, -1, 0, 0}, b[] = {0, 0, 1, -1}; vector < vector <pair<int, int> > > pre(v.size(), vector < pair <int, int> >(v[0].size())); vector < vector <char> > used (v.size(), vector <char>(v[0].size())); pre[start.first][start.second] = make_pair(-1, -1); used[start.first][start.second] = true; while (!q.empty()) { pair <int, int> curr = q.front(); q.pop(); if (v[curr.first][curr.second] == '*') { vector <pair <int, int> > path; for (pair <int, int> k = make_pair(curr.first, curr.second); k != pre[start.first][start.second]; k = pre[k.first][k.second]) path.push_back(k); cout << path.size() << endl; reverse(path.begin(), path.end()); for (int j = 0; j < path.size(); ++j) cout << path[j].first + 1 << ' ' << path[j].second + 1 << endl; return; } for (int i = 0; i < 4; ++i) { int x = curr.first + a[i], y = curr.second + b[i]; if (x >= 0 && x < v.size() && y >= 0 && y < v[0].size() && !used [x][y] && v[x][y] != '1') { q.push(make_pair(x, y)); used[x][y] = true; pre[x][y] = make_pair(curr.first, curr.second); } } if (v[curr.first][curr.second] == 't') { for (int j = 0; j < t.size(); ++j) { if (t[j].x1 == curr.first && t[j].y1 == curr.second) { if (!used[t[j].x2][t[j].y2]) { q.push(make_pair(t[j].x2, t[j].y2)); used[t[j].x2][t[j].y2] = true; pre[t[j].x2][t[j].y2] = make_pair(t[j].x1, t[j].y1); } break; } } } } cout << "Impossible"; } int main () { //freopen ("INPUT.TXT", "r", stdin); //freopen ("OUTPUT.TXT", "w", stdout); int n, m; cin >> n >> m; pair <int, int> start; cin >> start.first >> start.second; --start.first; --start.second; vector <vector <char> > g(n, vector <char>(m)); for (int i = 0; i < n; ++i) for (int j = 0; j < m; ++j) cin >> g[i][j]; int tunnel_num; cin >> tunnel_num; vector <tunnel> tunnels(tunnel_num); for (int i = 0; i < tunnel_num; ++i) { cin >> tunnels[i]; g[tunnels[i].x1][tunnels[i].y1] = 't'; } int end_num; cin >> end_num; for (int i = 0; i < end_num; ++i) { int x, y; cin >> x >> y; --x; --y; g[x][y] = '*'; } //print(g); bfs(g, start, tunnels); }
7b5b7682edc9ce493287a6d8d0c1d36667e6f69d
588c8bb8901d8807074aed6e93a9d3b429330a3b
/2. c++과제3.cpp
c0e776b18628d7f6a494b7e7e0e0a85f6b5fed5d
[]
no_license
hswest/C-study
20cb225ebd1d35dc753fc5045b177a87bec06e11
d5509e8580174888d55902c697fad68afc1a0faf
refs/heads/main
2023-07-10T09:51:09.079123
2021-08-25T10:54:25
2021-08-25T10:54:25
351,849,717
0
0
null
null
null
null
UTF-8
C++
false
false
197
cpp
2. c++과제3.cpp
#include <iostream> using namespace std; int main(void) { int a = 10; int* ptr = &a; cout << "변수 A의 주소는 : " << ptr << endl; cout << "a의 값은 : " << *ptr << endl; }
6709a7bfe96e12cfabb0a54ca374ea6ca8d26495
5acd91b1b6f5e205cdc29e4db2e6bc8f33acbee4
/Chapter04/StudentGroup/inc/StudentInfo.h
aeffa67a9d855b4272ad4a5cb6bd91723b511f3d
[]
no_license
cuongcb/acceleratedcpp
4536cf4b4d076bb64cfd45f395299a545f05a772
627a2ecea33adb0d18e70a36041181e5dbdeb532
refs/heads/master
2021-04-09T18:01:22.561960
2020-05-30T04:32:54
2020-05-30T04:32:54
125,845,957
0
0
null
null
null
null
UTF-8
C++
false
false
1,600
h
StudentInfo.h
#include <algorithm> #include <iomanip> #include <iostream> #include <ios> #include <list> #include <stdexcept> #include <string> #include <vector> #include <numeric> using std::vector; using std::sort; using std::domain_error; using std::istream; using std::cout; using std::cin; using std::string; using std::streamsize; using std::setprecision; using std::endl; using std::max; using std::list; using std::ostream; using std::accumulate; struct StudentInfo { string name; double midterm; double final; vector<double> homework; }; typedef std::vector<StudentInfo> containter; //typedef std::list<StudentInfo> containter; bool Compare(const StudentInfo &a, const StudentInfo &b); double Median(vector<double> vec); double Grade(double midterm, double final, double median); double Grade(double midterm, double final, const vector<double> &hw); double Grade(const StudentInfo &s); double GradeAux(const StudentInfo &s); double median_analysis(const vector<StudentInfo> &students); istream &read(istream &in, StudentInfo &s); istream &read_hw(istream &in, vector<double> &homework); bool did_all_hw(const StudentInfo &s); void write_analysis(ostream &out, const string &name, double analysis(const vector<StudentInfo> &students), const vector<StudentInfo> &did, const vector<StudentInfo> &didnt); double average(const vector<double> &v); double average_grade(const StudentInfo &s); double average_analysis(const vector<StudentInfo> &students); double optimistic_median(const StudentInfo &s); double optimistic_analysis(const vector<StudentInfo> &students);
8a5fd4a2340f06e699f8800be113430a8a2d939d
17f2dd4fde9cbcd9b3b0cd101fc740d3495bbe80
/530 - 16bit BMP 转 8bit/bmp.cpp
11cb5e07cd83c8e52108479f44301ead34663072
[ "Apache-2.0" ]
permissive
NekoSilverFox/CPP
0a7f48b50ee1769bb5ba318fb6fb6c6c342e5544
c6797264fceda4a65ac3452acca496e468d1365a
refs/heads/master
2021-11-11T17:48:48.514822
2021-11-01T20:30:31
2021-11-01T20:30:31
230,780,197
11
7
null
2021-04-11T22:24:56
2019-12-29T17:12:19
C++
UTF-8
C++
false
false
5,235
cpp
bmp.cpp
 #include <windows.h> #include <iostream> #include <string> using namespace std; void main() { system("chcp 65001 && cls"); DeleteFile("Result.bmp"); string sFileName; BITMAPFILEHEADER bmpFileHeader; BITMAPINFOHEADER bmpInfoHeader; int Width, Height; RGBQUAD Palette[256]; WORD* inBuf; // RGBTRIPLE --> WORD BYTE* outBuf; HANDLE hInputFile, hOutFile; DWORD RW; cout << "Enter the full name, please: "; sFileName = "pict.bmp"; //cin >> sFileName; hInputFile = CreateFile(sFileName.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); if (hInputFile == INVALID_HANDLE_VALUE) return; hOutFile = CreateFile("Result.bmp", GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); if (hOutFile == INVALID_HANDLE_VALUE) { CloseHandle(hInputFile); return; } // Считываем инфу 读取图片信息 ReadFile(hInputFile, &bmpFileHeader, sizeof(bmpFileHeader), &RW, NULL); ReadFile(hInputFile, &bmpInfoHeader, sizeof(bmpInfoHeader), &RW, NULL); // Установим указатель на начало растра 将指针设置为图像的开始 SetFilePointer(hInputFile, bmpFileHeader.bfOffBits, NULL, FILE_BEGIN); Width = bmpInfoHeader.biWidth; Height = bmpInfoHeader.biHeight; #if 0 std::cout << std::endl << "--------- info ---------" << std::endl << "Разрешение изображения: " << Width << " x " << Height << std::endl << "Количество бит на пиксел: " << bmpInfoHeader.biBitCount << std::endl << "Размер изображения: " << bmpFileHeader.bfSize / 1024 << "KB" << std::endl << "----------------------" << std::endl << std::endl; #endif // Выделим память 分配内存 inBuf = new WORD[Width]; // --> WORD outBuf = new BYTE[Width]; // 16bit --> 8bit // Заполним заголовки bmpFileHeader.bfOffBits = sizeof(bmpFileHeader) + sizeof(bmpInfoHeader); bmpInfoHeader.biBitCount = 8; bmpFileHeader.bfSize = bmpFileHeader.bfOffBits + Width * Height + Width * Height % 4; // Запишем заголовки WriteFile(hOutFile, &bmpFileHeader, sizeof(bmpFileHeader), &RW, NULL); WriteFile(hOutFile, &bmpInfoHeader, sizeof(bmpInfoHeader), &RW, NULL); // Палитра черно-белая 输入颜色 for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { for (int k = 0; k < 4; k++) { Palette[i * 32 + j * 4 + k].rgbRed = i * 32; Palette[i * 32 + j * 4 + k].rgbGreen = j * 32; Palette[i * 32 + j * 4 + k].rgbBlue = k * 64; } } } WriteFile(hOutFile, Palette, 256 * sizeof(RGBQUAD), &RW, NULL); #if 0 for (int i = 0; i < 4; i++) { Palette[i].rgbBlue = i; for (int j = 0; j < 16; j++) { Palette[j].rgbGreen = j; for (int k = 0; k < 256; k++) { Palette[k].rgbRed = k; } } } for (int b = 0; b < 2; b++) { for (int r = 0; r < 2; r++) { for (int g = 0; g < 4; g++) { Palette[(b << 3) + (r << 2) + g + 21].rgbBlue = b * 255; Palette[(b << 2) + (r << 2) + g + 21].rgbRed = r * 255; Palette[(b << 3) + (r << 2) + g + 21].rgbGreen = g * 85; } } } // Палитра черно-белая 调色板是黑色和白色的 for (int i = 0; i < 256; i++) { Palette[i].rgbBlue = i; Palette[i].rgbGreen = i; Palette[i].rgbRed = i; Palette[i].rgbReserved = 0xff; } #endif // Начнем преобразовывать 开始转换 for (int i = 0; i < Height; i++) { ReadFile(hInputFile, inBuf, sizeof(WORD) * Width, &RW, NULL); for (int j = 0; j < Width; j++) { outBuf[j] = 0; //int tmpRed = inBuf[j] >> 8; //int tmpGreen = inBuf[j] >> 8; //int tmpBlue = inBuf[j] >> 8; //outBuf[j] = tmpRed + tmpGreen + tmpBlue; int tmpRed = inBuf[j] & 0b0111110000000000; int tmpGreen = inBuf[j] & 0b0000001111100000; int tmpBlue = inBuf[j] & 0b0000000000011111; tmpRed >> 10; tmpGreen >> 5; if (j % 2 == 0) { outBuf[j] |= ((tmpBlue +tmpRed + tmpGreen) / (766 / 2)) << 4; } else { outBuf[j] |= ((tmpBlue + tmpRed + tmpGreen) / (766 / 2)); } } WriteFile(hOutFile, outBuf, sizeof(BYTE) * Width, &RW, NULL); // Пишем мусор для выравнивания WriteFile(hOutFile, Palette, (3 * Width) % 4, &RW, NULL); SetFilePointer(hInputFile, Width % 4, NULL, FILE_CURRENT); } delete[] inBuf; delete[] outBuf; CloseHandle(hInputFile); CloseHandle(hOutFile); cout << "Updating has come to the end successfully!" << std::endl; // system("pause"); }
0548450cab399e73eb8106d9d4113497f6846f37
d9fd71eda5691b464edaaafbbd58ab55a9de843e
/GAME1001_W10/GAME1001_W10/MainBorked.cpp
afb0ee33879c4f3a625937e610748e28eb94707b
[]
no_license
stupidts/saved-stuff
4333e91f607ceb1834daf8862b02efe5b7185aaa
484e0ba581268d14749861934369be56b7fda4f3
refs/heads/master
2021-01-23T08:34:40.620695
2019-03-20T18:28:10
2019-03-20T18:28:10
102,527,811
0
0
null
2018-12-08T22:40:41
2017-09-05T20:40:48
C++
UTF-8
C++
false
false
1,935
cpp
MainBorked.cpp
#include <iostream> #include <string> using namespace std; class Employee { private: int m_empNumber; string m_name; double m_payRate; double m_hours; public: string GetName(string name); double GetPayRate(double payRate); double GetHours(double hours); double GetWage(); string PrintName(); }; string Employee::GetName(string name) { m_name = name; return 0; } double Employee::GetPayRate(double payRate) { m_payRate = payRate; return 0; } double Employee::GetHours(double hours) { m_hours = hours; return 0; } double Employee::GetWage() { return m_payRate * m_hours; } string Employee::PrintName() { return m_name; } int main() { Employee employee1; Employee employee2; string name; double pay; double hours; cout << "Employee 1" << endl; cout << "Please enter your name: "; cin >> name; employee1.GetName(name); cout << "Please enter your pay rate: "; cin >> pay; employee1.GetPayRate(pay); cout << "Please enter your hours worked: "; cin >> hours; employee1.GetHours(hours); cout << "\n\nEmployee 2" << endl; cout << "Please enter your name: "; cin >> name; employee2.GetName(name); cout << "Please enter your pay rate: "; cin >> pay; employee2.GetPayRate(pay); cout << "Please enter your hours worked: "; cin >> hours; employee2.GetHours(hours); if (employee1.GetWage() > employee2.GetWage()) { cout << employee1.PrintName() << " has a higher wage than " << employee2.PrintName() << ": " << employee1.GetWage() << ' vs ' << employee2.GetWage() << endl; } else if (employee2.GetWage() > employee1.GetWage()) { cout << employee2.PrintName() << " has a higher wage than " << employee1.PrintName() << ": " << employee2.GetWage() << ' vs ' << employee1.GetWage() << endl; } else { cout << employee2.PrintName() << " has the same wage as " << employee1.PrintName() << ": " << employee2.GetWage() << ' vs ' << employee1.GetWage() << endl; } system("pause"); return 0; }
5fd6f344abd4671100637ab3c1dc62e9feae65b1
7391e171bcd6e72fee726e44b32878ca95f15970
/examples/halide/timing_prefix.h
d8bbc5f57b6177f3a88a28d57fef2d72bf8c3050
[ "MIT" ]
permissive
jansel/opentuner
d757d946184b214a3a0d7a30060ef29447c2d7c2
05e2d6b9538c9e2d335a02c48c0f7e77d1c57077
refs/heads/master
2023-08-24T03:25:34.020895
2022-06-15T19:16:08
2022-06-15T19:16:08
6,891,172
328
94
MIT
2022-06-15T19:16:10
2012-11-27T21:22:13
Python
UTF-8
C++
false
false
3,404
h
timing_prefix.h
#include <Halide.h> #include <stdio.h> #include <sys/time.h> #include <unistd.h> #include <map> #include <string> // How many times to run (and take min) // #define AUTOTUNE_TRIALS 3 // Limit in seconds to try running for (0 = no limit) // #define AUTOTUNE_LIMIT 0 // Size to run with // #define AUTOTUNE_N 1024, 1024 inline void _autotune_timing_stub(Halide::Func& func) { func.compile_jit(); // TODO: this assumes scalar/non-Tuple outputs - should generalize to a Realization std::vector<Halide::Type> out_types = func.output_types(); std::vector<buffer_t> out_raw_bufs; std::vector<Halide::Buffer> out_bufs; for (int i = 0; i < out_types.size(); i++) { // Use the Buffer constructor as a helper to set up the buffer_t, // but then throw away its allocation which we don't really want. Halide::Buffer bufinit(out_types[i], AUTOTUNE_N); out_raw_bufs.push_back(*bufinit.raw_buffer()); out_raw_bufs[i].host = NULL; // TODO: free the host pointer?! out_bufs.push_back(Halide::Buffer(out_types[i], &out_raw_bufs[i])); assert(out_bufs[i].host_ptr() == NULL); // make sure we don't have an allocation } Halide::Realization output(out_bufs); func.infer_input_bounds(output); // assert(output[0].host_ptr()); // for now, the API doesn't seem to allocate outputs // TODO: this should go into Func::infer_input_bounds(Realization) for (int i = 0; i < output.size(); i++) { assert(!output[i].host_ptr()); // for now, the API doesn't seem to allocate outputs buffer_t buf = *output[i].raw_buffer(); // Figure out how much memory to allocate for this buffer size_t min_idx = 0, max_idx = 0; for (int d = 0; d < 4; d++) { if (buf.stride[d] > 0) { min_idx += buf.min[d] * buf.stride[d]; max_idx += (buf.min[d] + buf.extent[d] - 1) * buf.stride[d]; } else { max_idx += buf.min[d] * buf.stride[d]; min_idx += (buf.min[d] + buf.extent[d] - 1) * buf.stride[d]; } } size_t total_size = (max_idx - min_idx); while (total_size & 0x1f) total_size++; // Allocate enough memory with the right dimensionality. Halide::Buffer buffer(output[i].type(), total_size, buf.extent[1] > 0 ? 1 : 0, buf.extent[2] > 0 ? 1 : 0, buf.extent[3] > 0 ? 1 : 0); // Rewrite the buffer fields to match the ones returned for (int d = 0; d < 4; d++) { buffer.raw_buffer()->min[d] = buf.min[d]; buffer.raw_buffer()->stride[d] = buf.stride[d]; buffer.raw_buffer()->extent[d] = buf.extent[d]; } output[i] = buffer; } timeval t1, t2; double rv = 0; const unsigned int timeout = AUTOTUNE_LIMIT; alarm(timeout); for (int i = 0; i < AUTOTUNE_TRIALS; i++) { gettimeofday(&t1, NULL); func.realize(output); gettimeofday(&t2, NULL); alarm(0); // disable alarm double t = (t2.tv_sec - t1.tv_sec) + (t2.tv_usec - t1.tv_usec)/1000000.0; if(i == 0 || t < rv) rv = t; } printf("{\"time\": %.10f}\n", rv); exit(0); } #ifndef AUTOTUNE_HOOK #define AUTOTUNE_HOOK(x) #endif #ifndef BASELINE_HOOK #define BASELINE_HOOK(x) #endif
5240a8049a939a90b4cdcdca91a41e756d43500e
d16081e3760d74a2fc80360f4b5ac17f9561289c
/myrobot.cpp
cf5930b253801cb343dd1e4388b06b72dd00b8f6
[]
no_license
Ghariq/WifiBot
8c59cf3e491a276d080738648f943358e6c1201e
56fd174d707249d01377d279cd813689c5fb95e1
refs/heads/master
2023-06-02T12:24:42.889141
2021-06-18T12:38:28
2021-06-18T12:38:28
366,610,346
0
0
null
null
null
null
UTF-8
C++
false
false
6,483
cpp
myrobot.cpp
// myrobot.cpp #include "myrobot.h" #include <iostream> #include "ui_mainwindow.h" // Constructeur MyRobot::MyRobot(QObject *parent) : QObject(parent) { DataToSend.resize(9); DataToSend[0] = 0xFF; // const DataToSend[1] = 0x07; // const DataToSend[2] = 0x0; // vitesse gauche DataToSend[3] = 0x0; // unused DataToSend[4] = 0x0; // vitesse droite DataToSend[5] = 0x0; // unused DataToSend[6] = 0x0; // 80/0x50 : devant, 0/0x0 : recule, 64/0x40 : gauche sur place, 16/0x10 : droit sur place DataToSend[7] = 0x0; // CRC Part 1 DataToSend[8] = 0x0; // CRC Part 2 DataReceived.resize(21); TimerEnvoi = new QTimer(); // setup signal and slot connect(TimerEnvoi, SIGNAL(timeout()), this, SLOT(MyTimerSlot())); //Send data to wifibot timer _beyblade=false; go_backward=false; go_forward=false; go_left=false; go_right=false; _max_speed=v_max; nb_timer_to_wait=5; } void MyRobot::doConnect() { socket = new QTcpSocket(this); // socket creation connect(socket, SIGNAL(connected()),this, SLOT(connected())); connect(socket, SIGNAL(disconnected()),this, SLOT(disconnected())); connect(socket, SIGNAL(bytesWritten(qint64)),this, SLOT(bytesWritten(qint64))); connect(socket, SIGNAL(readyRead()),this, SLOT(readyRead())); //qDebug() << "Connecting..."; // this is not blocking call //socket->connectToHost("LOCALHOST", 15020); socket->connectToHost("192.168.1.106", 15020); // connection to wifibot // we need to wait... if(!socket->waitForConnected(5000)) { qDebug() << "Error: " << socket->errorString(); } else TimerEnvoi->start(75); } // Fonction de déconnexion void MyRobot::disConnect() { TimerEnvoi->stop(); socket->close(); } // Quand connecté : void MyRobot::connected() { qDebug() << "Connected"; // Hey server, tell me about you. emit changeConnectState(true); } // Quand déconnecté : void MyRobot::disconnected() { qDebug() << "Disconnected"; emit changeConnectState(false); } // Quand on écrit X octets : void MyRobot::bytesWritten(qint64 bytes) { //qDebug() << bytes << " bytes written..."; } // Lecture de données void MyRobot::readyRead() { DataReceived = socket->readAll(); emit updateUI(DataReceived); } // A chaque timer : void MyRobot::MyTimerSlot() { if (nb_timer_to_wait>0) { nb_timer_to_wait--; } else decreasedSpeed(); while (Mutex.try_lock()); socket->write(DataToSend); socket->readAll(); Mutex.unlock(); } // Fonction move avant/arriere void MyRobot::move() { nb_timer_to_wait=2; while(Mutex.tryLock()); // On attend la libération du Mutex if (!_beyblade) { for (int i=1; i<3; i++) // On augmente la vitesse { int nb=2*i; if ((unsigned char)DataToSend[nb]<(unsigned char)_max_speed && (go_forward || go_backward)) // Si on a pas atteind la vitesse max et que l'on veut avancer { if ((unsigned char)DataToSend[nb]<(unsigned char)70) // Si on a une vitesse inférieure à 70 on se place à 70 { DataToSend[nb]=(unsigned char)70; } else DataToSend[nb] = DataToSend[nb] + (unsigned char)10; // On augmente de 10 la vitesse if ((unsigned char)DataToSend[nb]>(unsigned char)_max_speed) // Si on a dépassé la vitesse max { DataToSend[nb]=(unsigned char)_max_speed; } } } // Pour tourner if (go_left) // Si il faut aller à gauche { DataToSend[2]= (unsigned char)(((unsigned char)DataToSend[4])-((unsigned char)70)); } else if (go_right) // Si il faut aller à droite { DataToSend[4]= (unsigned char)(((unsigned char)DataToSend[2])-((unsigned char)70)); } // Sens des roues if (go_backward) // Si on veut aller vers l'arriere { DataToSend[6]=0x0; } else DataToSend[6]=0x50; // Sinon on va vers l'avant } else { DataToSend[2]=(unsigned char)_max_speed; DataToSend[4]=(unsigned char)_max_speed; if (go_right) { DataToSend[6]=16; } else DataToSend[6]=64; } // Reset des variables de déplacement go_left = false; go_right = false; go_forward=false; go_backward=false; _beyblade = false; // Calcul CRC short crcfull = Crc16(DataToSend); DataToSend[7]=crcfull; DataToSend[8]=crcfull >> 8; getSpeed(); Mutex.unlock(); } // Arrête/ralenti quand on appuie plus void MyRobot::decreasedSpeed() { if ((unsigned char)DataToSend[2]>(unsigned char)0) { DataToSend[2]=0; } if ((unsigned char)DataToSend[4]>(unsigned char)0) { DataToSend[4]=0; } getSpeed(); } // Fonction avancer void MyRobot::forward() { go_forward=true; move(); } // Fonction reculer void MyRobot::backward() { go_backward=true; move(); } // Fonction gauche void MyRobot::left(bool go_forward) { go_left=true; if (go_forward) { forward(); } else backward(); } // Fonction droite void MyRobot::right(bool go_forward) { go_right=true; if (go_forward) { forward(); } else backward(); } // Fonction calcul du CRC quint16 MyRobot::Crc16(QByteArray tab) { tab.data(); unsigned char *data = (unsigned char*) tab.constData(); quint16 crc = 0xFFFF; quint16 poly = 0xA001; quint16 parity =0; int pos=1; for (; pos<tab.length()-2; pos++) { crc ^= *(data+pos); for (unsigned int bit=0; bit <=7; bit++) { parity = crc; crc >>=1; if (parity%2==true) crc ^= poly; } } return crc; } // Retourne la vitesse du plus rapide int MyRobot::getSpeed() { unsigned char speed; if ((unsigned char) DataToSend[2]< (unsigned char) DataToSend[4]) { speed = (unsigned char) DataToSend[4]; } else speed = (unsigned char) DataToSend [2]; emit changeSpeed((int) speed); return ((int) speed); } // Change la vitesse max void MyRobot::setMaxSpeed(int max_speed) { if (max_speed <= (int)v_max && max_speed >=0) { _max_speed=(unsigned char) max_speed; } } // Fait tourner le robot sur lui même void MyRobot::beyblade(bool right) { go_right=right; _beyblade=true; move(); }
30fe40bd1d6d44c037a7cb5d5a922c4de63641d8
906d7d57cb8eae56bf2f0feb3ac2265537856c5b
/src/sudokuantsystem.h
804caad7aa14ce683fe102c5632080ddea871c8a
[]
no_license
zhengfish/sudoku_acs
f14477bc0cc47255c8d0483f5555b8348ec1f619
5181658dd674731029e7703241cfd22c3d3c936d
refs/heads/master
2020-06-24T13:06:59.143985
2018-05-03T10:29:23
2018-05-03T10:29:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,519
h
sudokuantsystem.h
#pragma once #include <vector> #include <random> #include "sudokuant.h" #include "board.h" #include "timer.h" #include "sudokusolver.h" class SudokuAntSystem : public SudokuSolver { int numAnts; float q0; float rho; float pher0; float bestEvap; Board bestSol; float bestPher; int bestVal; Timer solutionTimer; float solTime; std::vector<SudokuAnt*> antList; std::mt19937 randGen; std::uniform_real_distribution<float> randomDist; float **pher; // pheromone matrix int numCells; void InitPheromone(int numCells, int valuesPerCell); void ClearPheromone(); void UpdatePheromone(); float PherAdd(int numCellsFixed); public: SudokuAntSystem(int numAnts, float q0, float rho, float pher0, float bestEvap) : numAnts(numAnts), q0(q0), rho(rho), pher0(pher0), bestEvap(bestEvap) { for ( int i = 0; i < numAnts; i++ ) antList.push_back(new SudokuAnt(this)); randomDist = std::uniform_real_distribution<float>(0.0f, 1.0f); std::random_device rd; randGen = std::mt19937(rd()); } ~SudokuAntSystem() { for (auto a : antList) delete a; } virtual bool Solve(const Board& puzzle, float maxTime ); virtual float GetSolutionTime() { return solTime; } virtual const Board& GetSolution() { return bestSol; } // helpers for ants inline float Getq0() { return q0; } inline float random() { return randomDist(randGen); } inline float Pher(int i, int j) { return pher[i][j]; } void LocalPheromoneUpdate(int iCell, int iChoice); };
d77b5ba61f3ac55f5a9f1a9ab89b47cbf352a289
f6cf14142621b8c4709c6f2073172f39577b1964
/api2/lib/rec/rpc/configuration/rec_rpc_configuration_Configuration.hpp
e98306de460d9d0ec948603aea937b2933df8575
[]
no_license
BusHero/robotino_api2
f3eef6c1ace2ff5a8b93db691aa779db8a9ce3a1
9757814871aa90977c2548a8a558f4b2cb015e5d
refs/heads/master
2021-06-18T21:32:14.390621
2021-02-18T15:21:48
2021-02-18T15:21:48
165,231,765
1
0
null
null
null
null
UTF-8
C++
false
false
5,628
hpp
rec_rpc_configuration_Configuration.hpp
/* Copyright (c) 2011, REC Robotics Equipment Corporation GmbH, Planegg, Germany All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the REC Robotics Equipment Corporation GmbH nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _REC_RPC_CONFIGURATION_CONFIGURATION_H_ #define _REC_RPC_CONFIGURATION_CONFIGURATION_H_ #include "rec/rpc/defines.h" #include "rec_rpc_configuration_Item.hpp" #include <QtCore> #include <QtNetwork> #include <QtXml> namespace rec { namespace rpc { namespace configuration { class ConfigurationLocker; class REC_RPC_EXPORT Configuration : public QObject { Q_OBJECT friend class ConfigurationLocker; public: static const unsigned int InfoFlag = 0x80000000; static const unsigned int LocalFlag = 0x40000000; Configuration( QObject* parent = NULL ); Configuration( const Configuration& other ); Configuration& operator=( const Configuration& other ); bool isEmpty() const; unsigned int nextId(); bool contains( const QString& name ) const; bool contains( unsigned int id ) const; QList< unsigned int > ids() const; QStringList names() const; Item item( const QString& name ) const; Item item( unsigned int id ) const; Item& itemRef( const QString& name ); // Don't forget to lock!!! Item& itemRef( unsigned int id ); // Don't forget to lock!!! unsigned int id( const QString& name ) const; QString name( unsigned int id ) const; bool isInitialized( const QString& name ) const; bool isInitialized( unsigned int id ) const; QByteArray data( const QString& name, rec::rpc::ClientInfo* publisher ) const; QByteArray data( unsigned int id, rec::rpc::ClientInfo* publisher ) const; bool setData( const QString& name, const QByteArray& data, const rec::rpc::ClientInfo& publisher ); bool setData( unsigned int id, const QByteArray& data, const rec::rpc::ClientInfo& publisher ); bool isServerOnly( const QString& name ) const; bool isEnqueuedTopic( const QString& name ) const; bool isEnqueuedTopic( unsigned int id ) const; rec::rpc::ClientInfoSet registeredClients( const QString& name ) const; bool isClientRegistered( const QString& name, const rec::rpc::ClientInfo& clientInfo ) const; bool isClientRegistered( unsigned int id, const rec::rpc::ClientInfo& clientInfo ) const; rec::rpc::ClientInfoSet addRegisteredClient( const QString& name, const rec::rpc::ClientInfo& clientInfo ); rec::rpc::ClientInfoSet addRegisteredClient( unsigned int id, const rec::rpc::ClientInfo& clientInfo ); rec::rpc::ClientInfoSet removeRegisteredClient( const QString& name, const rec::rpc::ClientInfo& clientInfo ); rec::rpc::ClientInfoSet removeRegisteredClient( unsigned int id, const rec::rpc::ClientInfo& clientInfo ); void clearRegisteredClients( const QString& name ); void clearRegisteredClients( unsigned int id ); /** @return Returns false if the name is already in use of if name or type are empty strings. */ bool addItem( unsigned int id, const QString& name, bool serverOnly = false, bool permanent = false, bool enqueued = false, const QString& sharedMemKey = QString::null ); bool removeItem( const QString& name ); bool renameItem( const QString& oldName, const QString& newName ); void beginBatchJob(); void endBatchJob(); QByteArray save() const; bool load( const QByteArray& data ); Q_SIGNALS: void changed(); private: bool addItem_i( unsigned int id, const QString& name, bool serverOnly, bool permanent, bool enqueued, const QString& sharedMemKey ); QMap< unsigned int, Item > _itemFromId; QMap< QString, unsigned int > _idFromName; mutable QMutex _mutex; unsigned int _curId; bool _batchJobStarted; }; class ConfigurationLocker { public: ConfigurationLocker( Configuration& configuration ) : _lk( &configuration._mutex ) { } private: QMutexLocker _lk; }; } } } #include <QMetaType> Q_DECLARE_METATYPE( rec::rpc::configuration::Configuration ) static QDebug operator<<( QDebug dbg, const rec::rpc::configuration::Configuration& cfg ) { dbg.nospace() << cfg.names(); return dbg.space(); } #endif //_REC_RPC_CONFIGURATION_CONFIGURATION_H_
53af13c70797183af53633047ba85e06ddd53b39
2a4c8bb1abb9e089161d5a299842ad6f1e846dcc
/parser/parser.h
3012909ac0d919de52b22b65be6a0113f2ef2b4f
[]
no_license
chestnutprog/ohmydbms
b5fa7196fb96243a50bdacf27aca82e5d2e4b65c
62bc91a7880e6105a4c3b355c3fc6d037a18dd6a
refs/heads/main
2023-01-20T09:56:22.982754
2020-10-28T07:41:20
2020-11-25T03:56:38
307,941,080
0
0
null
null
null
null
UTF-8
C++
false
false
340
h
parser.h
// // Created by Chestnut on 2020/11/4. // #ifndef OHMYDBMS_PARSER_H #define OHMYDBMS_PARSER_H #include "../helper.h" #include "SQLTtree.h" #include <regex> #include <string> #include <vector> using namespace std; class Parser { public: DB_RESULT_TYPE parse(std::string query); }; #endif // OHMYDBMS_PARSER_H
1d611e979214c01313bbeb7665cdf10f4bb7d8a0
c77053148f6401b32b9c3379b55b5db525f2dfb4
/old/rew/src/Stela/Inst/FillAt.cpp
d418e338e261b66f47bd3f25defb5b3fce9e4fa2
[]
no_license
hleclerc/Stela
32a413d8b5381d0f3114756d9db58ab757792455
4e5cbe46eebd9b7c4dc8dd24c080e5aba7cee5ad
refs/heads/master
2021-05-15T01:32:04.767731
2017-01-10T07:44:46
2017-01-10T07:44:46
15,909,068
0
0
null
null
null
null
UTF-8
C++
false
false
2,223
cpp
FillAt.cpp
#include "InstInfo_C.h" #include "FillAt.h" #include "Slice.h" #include "Type.h" #include "Cst.h" #include "Op.h" #include "Ip.h" /** inp[ 0 ] -> src inp[ 1 ] -> val inp[ 2 ] -> off */ class FillAt : public Inst { public: FillAt( Type *off_type ) : off_type( off_type ) {} virtual void write_dot( Stream &os ) const { os << "fill_at"; } virtual Expr forced_clone( Vec<Expr> &created ) const { return new FillAt( off_type ); } virtual int size() const { return inp[ 0 ]->size(); } virtual Expr _simp_slice( int off, int len ) { SI32 beg; if ( inp[ 2 ]->get_val( beg, off_type ) ) { SI32 end = beg + inp[ 1 ]->size(); if ( off + len <= beg or off >= end ) return slice( inp[ 0 ], off, len ); if ( off >= beg and off + len <= end ) return slice( inp[ 1 ], off - beg, len ); } return Inst::_simp_slice( off, len ); } virtual void write_to( Codegen_C *cc, int prec = -1 ) { if ( par.size() > 1 ) TODO; cc->add_type( &ip->type_PI8 ); cc->on << "*(" << *IIC( inp[ 1 ] )->out_type << " *)( (PI8 *)&" << cc->code( inp[ 0 ] ) << " + " << cc->code( inp[ 2 ], PREC_div ) << " / 8 ) = " << cc->code( inp[ 1 ] ) << ";"; IIC( this )->out_reg = IIC( inp[ 0 ] )->out_reg; } // virtual void write_to( Codegen_C *cc, int prec, OutReg *out_reg ) { // *cc->os << "2"; // } Type *off_type; }; Expr fill_at( Expr src, Expr val, Type *off_type, Expr off ) { SI32 off_val; if ( off->get_val( off_val, off_type ) ) { // complete fill ? if ( off_val == 0 and src->size() == val->size() ) return val; // PI8 data[ src->sb() ]; int pb = off_val + val->size(); if ( src->get_val( data, off_val ) and val->get_val( data, val->size(), 0, off_val ) and src->get_val( data, src->size() - pb, pb, pb ) ) { // TODO: get_val with unknown return cst( src->size(), data ); } } FillAt *res = new FillAt( off_type ); res->add_inp( src ); res->add_inp( val ); res->add_inp( off ); return res; }
ea5bfc765c547ffa267f0f4183a17a947e25c8e2
7442908d26e73b4be9f5ca26e1bd6cba18c97bca
/Integer.cpp
2bdc631e3fb2872967ae395aeb626065740e7f7f
[]
no_license
alexander-zinovyev/List
851b0ca6ce2289524dfa5dcf4ed58eb70eb21266
8d4c50dc0b29409f25999348228df007781bcad6
refs/heads/master
2021-05-30T18:01:39.136687
2015-09-18T22:29:30
2015-09-18T22:29:30
null
0
0
null
null
null
null
UTF-8
C++
false
false
318
cpp
Integer.cpp
// // Created by s1dex on 17.09.15. // #include <iostream> #include "Integer.h" Integer::Integer(int x) : data(x) { } Integer::~Integer() { } void Integer::setData(int x) { this->data = x; } int Integer::getData() { return this->data; } void Integer::print() { std::cout << this->data << std::endl; }
f7ace2ca51ed92348c4358a21f2707bb43fde2cb
e5f4f37d941ceb8145d65f92028cc54658b1ac01
/Code/Engine/RendererCore/AnimationSystem/AnimGraph/AnimNodes/EventAnimNode.h
121db041a22473c9031a3187a8c5ad96f9f6eebf
[ "MIT" ]
permissive
ezEngine/ezEngine
19983d2733a5409fb2665c6c3a0a575dadcefb50
c46e3b4b2cd46798e4abb4938fbca281c054b039
refs/heads/dev
2023-09-06T02:17:28.152665
2023-09-05T18:25:43
2023-09-05T18:25:43
18,179,848
1,050
165
MIT
2023-09-14T21:44:39
2014-03-27T15:02:16
C++
UTF-8
C++
false
false
1,035
h
EventAnimNode.h
#pragma once #include <RendererCore/AnimationSystem/AnimGraph/AnimGraphNode.h> class EZ_RENDERERCORE_DLL ezSendEventAnimNode : public ezAnimGraphNode { EZ_ADD_DYNAMIC_REFLECTION(ezSendEventAnimNode, ezAnimGraphNode); ////////////////////////////////////////////////////////////////////////// // ezAnimGraphNode protected: virtual ezResult SerializeNode(ezStreamWriter& stream) const override; virtual ezResult DeserializeNode(ezStreamReader& stream) override; virtual void Step(ezAnimController& ref_controller, ezAnimGraphInstance& ref_graph, ezTime tDiff, const ezSkeletonResource* pSkeleton, ezGameObject* pTarget) const override; ////////////////////////////////////////////////////////////////////////// // ezSendEventAnimNode public: void SetEventName(const char* szSz) { m_sEventName.Assign(szSz); } const char* GetEventName() const { return m_sEventName.GetString(); } private: ezHashedString m_sEventName; // [ property ] ezAnimGraphTriggerInputPin m_InActivate; // [ property ] };
798022eaa1cca6eb3bccad6ba1a00074392d3b4c
5546e24f6c3a06142bbf908bb03ef2fd3e3fdac3
/cms_tests/connection_request.cxx
aa6fa960cbfa9f432e11528fbeecda6369784ca6
[]
no_license
BxCppDev/VireSandbox
0e59e0026d2520d45c070a2ce83389cd665a83a4
a0c04dbaaef45c9e0ba5cc0ea074e5bdfa34ff5b
refs/heads/master
2021-05-15T11:03:09.764250
2018-07-06T05:30:52
2018-07-06T05:30:52
108,272,784
0
0
null
null
null
null
UTF-8
C++
false
false
7,039
cxx
connection_request.cxx
// Standard library: #include <iostream> #include <fstream> #include <cstdlib> #include <memory> // Boost #include <boost/program_options.hpp> // BxProtobuftools: #include <bayeux/protobuftools/iofile.h> // Vire: #include <vire/vire.h> #include <vire/time/utils.h> #include <vire/message/message.h> #include <vire/message/message_header.h> #include <vire/message/message_body.h> #include <vire/message/body_layout.h> #include <vire/utility/path.h> #include <vire/cms/connection_request.h> // RabbitMQ #include "rabbitmq/parameters.h" #include "rabbitmq/connection.h" #include "rabbitmq/channel.h" using namespace std; void print_usage (boost::program_options::options_description & opts_, ostream & out_) { static const string APP_NAME = "connection_request"; out_ << "\n" << APP_NAME << " -- " << endl; out_ << endl; out_ << "Usage : " << endl; out_ << std::endl; out_ << " " << APP_NAME << " [OPTIONS] " << endl; out_ << opts_ << endl; return; } int main (int argc_, char* argv_ []) { vire::initialize (); const string snemo = "SuperNEMO"; const string vhost = "/supernemo/demonstrator/cms/vire/subcontractors/system/cmslapp"; const string exchange = "subcontractor.service"; const string login = "vireserver"; const string passwd = "vireserver"; string routing_key = "connection"; string host = "localhost"; uint16_t port = 5671; vector <string> resources; namespace po = boost::program_options; po::options_description opts ("Main options"); opts.add_options () ("help,?", po::value <bool> ()->zero_tokens ()->default_value(false), "Produce help message") ("host,h", po::value <std::string> ()->value_name ("host"), "Set the rabbitmq server host. \n" "Example :\n" " --host \"caerabbitmq.in2p3.fr\"") ("port,p", po::value <uint16_t> ()->value_name ("port"), "Set the rabbitmq server port number. \n" "Example :\n" " --port 5671") ("resource,r", po::value <vector <string>> ()->value_name ("resource"), "Resource path list\n" "Example :\n" " -r /path/to/resource_1\n" " -r /path/to/resource_2\n" " -r ...\n"); po::variables_map vm; try { po::store (po::parse_command_line (argc_, argv_, opts), vm); } catch (po::error &e) { cerr << "ERROR: " << e.what () << endl << endl; print_usage (opts, cout); return EXIT_FAILURE; } if (vm.count ("help")) { if (vm ["help"].as <bool> ()) { print_usage (opts, cout); return EXIT_SUCCESS; } } if (vm.count ("host")) host = vm ["host"].as <string> (); if (vm.count ("port")) port = vm ["port"].as <uint16_t> (); if (vm.count ("resource")) resources = vm ["resource"].as <vector <string>> (); if (resources.size () == 0) { print_usage (opts, cout); return EXIT_FAILURE; } // Message: vire::message::message req_msg; // Header: vire::message::message_header & req_msg_header = req_msg.grab_header (); vire::message::message_identifier req_msg_id ("vire.server", 42); vire::utility::model_identifier req_body_layout_id; req_body_layout_id.set_name (vire::message::body_layout::name()); req_body_layout_id.set_version (1); req_msg_header.set_body_layout_id (req_body_layout_id); req_msg_header.set_message_id (req_msg_id); req_msg_header.set_timestamp (vire::time::now ()); req_msg_header.set_category (vire::message::MESSAGE_REQUEST); // Payload: vire::utility::instance_identifier snemo_id ("SuperNEMO_Demonstrator"); auto con_rq_ptr = std::make_shared<vire::cms::connection_request>(); auto & con_req = *con_rq_ptr; con_req.set_setup_id (snemo_id); for (vector <string>::iterator itr = resources.begin (); itr != resources.end (); ++itr) { con_req.add_requested_resource (snemo + ":" + *itr); } clog << endl; con_req.tree_dump (clog, "Connection request: "); clog << endl; con_rq_ptr->tree_dump (clog, "Connection request (ptr): "); clog << endl; // Body: vire::message::message_body & req_msg_body = req_msg.grab_body (); req_msg_body.set_payload (con_rq_ptr); // /////////// // vire::utility::model_identifier payload_type_id1 = req_msg_body.get_payload_type_id (); // vire::utility::model_identifier payload_type_id2; // payload_type_id2.set (payload_type_id1.get_name (), 1); // req_msg_body.set_payload_type_id (payload_type_id2); // /////////// req_msg.tree_dump (std::clog, "Req. Message: "); clog << endl; con_req.tree_dump (clog, "Connection request: "); // Generate protobufized message: ostringstream req_protobuf; protobuftools::store (req_protobuf, req_msg, 0); // Rabbit connection const bool pub_confirm = true; rabbitmq::connection_parameters c_par; c_par.host = host; c_par.port = port; c_par.vhost = vhost; c_par.login = login; c_par.passwd = passwd; rabbitmq::connection con (c_par, pub_confirm); rabbitmq::channel & chan = con.grab_channel (); string response; uint64_t delivery; rabbitmq::basic_properties prop_out; rabbitmq::basic_properties prop_in; rabbitmq::queue_parameters q_par; rabbitmq::exchange_parameters x_par; x_par.name = exchange; x_par.type = "topic"; q_par.name = ""; q_par.exclusive = true; chan.queue_declare (q_par); clog << "rab queue " << q_par.name << endl; chan.basic_consume (q_par.name, "", true); prop_out.set_correlation_id ("corid_" + std::to_string (std::rand ())); prop_out.set_reply_to (q_par.name); chan.basic_publish (x_par.name, routing_key, req_protobuf.str (), prop_out); while (1) { chan.consume_message (response, routing_key, prop_in, delivery); if (not prop_in.has_correlation_id ()) continue; if (prop_in.get_correlation_id () == prop_out.get_correlation_id ()) break; } // clog << " [x] Got " << response << endl; stringstream resp_protobuf; resp_protobuf << response; vire::message::message resp_msg; protobuftools::load (resp_protobuf, resp_msg, 0); // Dump message: resp_msg.tree_dump (std::clog, "Response : "); clog << "--------------------------------------------------------------------------------------" << endl; vire::terminate(); return EXIT_SUCCESS; }